Space Automation scripts are Kotlin!
.space.kts file in your repository describes automation jobs... and it's Kotlin! Install the Space plugin into your JetBrains IDE, and enjoy the power of code completion, syntax highlighting, and more!
As an example, you can move common logic into functions. Need to send a chat message after build completes? Write a function for it, or use the Extract method refactoring to move existing script code into a separate function.
Here's a bonus tip! Have a look at this example of using
@file:DependsOn() to reference an external library and get even more power in your automation!