The automated fellowship 🤖

Hi! I’m Javier :cow2: and I’ll be your mechanic in this Polkadot garage.

I’m part of the Automation team :mechanical_arm: in Parity, where we take down as many pain points as possible with the power of automation :mechanical_leg:

Today, I want to introduce you all to the many Fellowship automations we have developed.

We will be talking about 5 different tools:

  • Review action
  • Auto-Merge Bot
  • Up-To-Date action
  • Changelog action
  • RFC Action

Why do we need these automations?

The polkadot-fellows organization works in a unique way. Most fellows are not members of the organization itself, but instead of part of the fellowship, an on-chain community with ranks.

Because of this, we need to find a way to make the fellows able to interact with the repositories without making them members. To do so we needed to generate plenty of tools that identify the fellow, their ranks and what permissions they have on the repository.

Every member of the fellowship is required to use the identity pallet to register their information, including their GitHub handle. Using an action I developed named get-fellows-action I’m able to extract all the members and their ranks to use in the actions.

Here you can see a list of all the current fellows, their ranks and their GitHub handles.

Review Bot

Review Bot is a custom action used to fine tune repository review rules. It allows setting very specific rules, for example, if a user modifies a directory, this PR must be reviewed by at least 1 fellow of a given rank (or higher) and a combination of certain fellows.

A rule is given a directory to safeguard and some rules, which are the minimum number of fellows of a given rank required and a minimum score to be reached.

Scores

Every rank is given a score (as reflected in the configuration file) and, when they approve a PR, their score counts towards the required score.

If a PR has a minimum score required of 6, then it could be reviewed either by 6 dan1 (score of 1), 3 dan2 (score of 2), 1 dan4 (score of 9) or maybe a combination, like 2 dan2 and 2 dan1.

With these rules, we ensure that sensitive changes are reviewed by higher ranks but, by adding scoring, we also allow every fellow, doesn’t matter what rank they are, to collaborate towards the future of the project.

Auto-Merge Bot

Auto-Merge-Bot is a GitHub action which allows PRs to be merged (or set to auto-merge).

Because most fellows do not have write access to the repository, they can only open PRs, but not merge them. Auto-Merge Bot is a comment cli, triggered by running /merge. It merges the PR, or enables auto-merge if possible.

This way a developer of a PR does not need to wait for an admin to merge their PR.

Up-To-Date action

Up-To-Date-Action is another GitHub action used to keep pull requests up to date.

It often happens that when a user is ready to merge their PR, another change got added beforehand, and now they have to manually update the PR pressing this button.

This action ensures that any PR that has auto-merge enabled will be updated automatically, to stop it from becoming outdated or never merging at all.

Changelog

This is a minor action used to skip the requirement of modifying the changelog, as some small changes, like cosmetic or typos, do not deserve to modify the changelog.

RFC-Action

RFC-Action is a GitHub action developed to help the creation of RFC proposal referenda.

As the rfcs are written as a pull request and reviewed by other fellows, this tool helps once a rfc is ready for voting.

A user can write /rfc propose in the Pull Request and this will return a comment response with instructions to create an on-chain referendum.

Once this referendum is closed (either by approval or rejection), the action, which runs a cron job, will detect link the referendum to the PR and will automatically close it (by merging or closing the PR based on the RFC result).

6 Likes