New bot features: Moving and closing Github issues


#1

There’s been quite a bit happening with @miq_bot over the last few weeks. Here’s a summary!

New: Moving Issues

There are often times when a Github issue is opened on ManageIQ/manageiq that is actually a problem with a particular gem, be it providers, the UI, or something else. That’s understandable - but it’s helpful for individual team to have an issue filed on their particular project instead.

Members of the ManageIQ organization can now tell the bot to ‘move’ issues from one repo to another with the move_issue command:




move_issue [organization_name/]repo_name

Moves the issue to the specified repo. The bot will open a new issue with your original title and description and close the current one. Useful for reorganizing issues opened on the core ManageIQ/manageiq repo to a more appropriate project (a provider or other ManageIQ plugin).

  • This command is restricted to members of the organization containing the issue.
  • The repository being moved to must be under the same organization as the issue being moved.
  • You cannot move a pull request.

Example: @miq-bot move_issue manageiq-providers-amazon

New: Closing Issues

Until now, only committers had the ability to close individual issues. However, given the sheer number of issues and repos to organize, this feature has been added to allow anyone within the organization to help close resolved or obsolete issues.

close_issue

Closes the issue.

  • This command is restricted to members of the organization containing the issue.
  • Restricted use on pull requests. Only the pull request author or a committer can close pull requests (who have access to close them directly anyway).

Example: @miq-bot close_issue

New: Generic path-based labeling

The bot used to have a labeler for automatically labeling ‘gem changes’ when a Gemfile or Gemfile.lock was changed and another labeler for adding ‘sql migration’ if any migrations were touched. Now, a new feature allowed us to delete these two features, maintaining functionality. What a bargain!

The bot can now be configured to add any label to any pull request in any repo with any changes that match any path with a regular expression.

For example, as requested by developers of the UI repo, if you now open a pull request on manageiq-ui-classic and add/change a file with a graphics file type extension it will automatically be labeled with graphics.

New: Github API metrics

To help monitor bot performance, we’ve recently added a time series database and record observations on each request to the Github API about which bot workers are making requests, what they are asking for, the rate limit for the hour, etc, and set up a Grafana dashboard to chart them.

This isn’t particularly useful for users of the bot, but for those that develop on it, it’s an extremely useful feature that’s helped us make large improvements.

Improved: Github API usage

The bot’s interface with the Github API has been completely refactored.

We were experiencing a small amount of downtime every hour as we hit Github’s API rate limit (5000 requests per hour), but since the refactor this is no longer an issue: Github requests have been more than halved.

The End

More features and improvements are on the horizon, but that’s all I got for now! Happy ManageIQ’ing!


Opening gh issues in miq repos
#2

Great progress! Thanks for the update!