Creating a GitHub stale repositories cleanup bot with Boomerang Flow

Why Boomerang Flow?

There are a number of tools that you can use to create a GitHub bot; GitHub Actions, Netlify, Heroku, or any functions hosting cloud, with various skill levels required.

The following will give you a view on doing the same with no-code automation.

Why a repositories bot?

Creating the Workflow

Boomerang Flows Create a new Workflow view

The default landing page is the Workflows screen and in your space will be the ability to create a new workflow.

Wiring together the bot

Boomerang Flows Workflow Editor view with Tasks Parameters

On the Workflow Editor screen, you can drag and drop a number of tasks from the palette providing a great end-user experience. For advanced management, these tasks are Tekton defined YAML and can be managed via the Task Manager.

Find Repositories in Org

Custom Task Name: `Find Repositories`.
Note: This will be used later on to get the result parameters.

Send Simple Slack Message

Note: We make use of the prior tasks' result parameters to output the found repositories.

Wire the Tasks together

Find out more information about Link and Tasks states.

Configure a Schedule Trigger

Boomerang Flows Workflow Editor & Configuration view

We want this to run on a weekly or monthly schedule. On the Configure tab under Triggers, enable the Scheduler and then click Change Schedule.

In the basic view you can set a weekly schedule or you can switch to the advanced view and set any cron based schedule.

The Activity

Boomerang Flows Workflow Activity view

Boomerang Flow provides an activity view where you can see whats running, dynamically tail logs, and view a Tasks Result Parameters.

Boomerang Flows Workflow Activity view with a Tasks Result Parameters

Result Parameters are important in this Workflow as it is how we passed information from the repositories listing Task that connected to GitHub, to the Slack messaging Task.

The Result

The bots message in Slack

And as you can see, the workflow resulted in a message post to a Slack channel. This is a really easy, no-code way of creating a bot.

What did we achieve

Future Steps

Show your support

- ⭐️ the GitHub repository
- 💬 Follow us on Twitter
- Install the project on your own Kubernetes cluster
- 🙏 Join us and help contribute

A software engineer and automation enthusiast, made in Australia, living in New York.