Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add force merge automation #5612

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

ci: add force merge automation #5612

wants to merge 3 commits into from

Conversation

mattdibi
Copy link
Contributor

@mattdibi mattdibi commented Dec 9, 2024

This PR introduces a new Github workflows that allow to bypass the CI status checks via team member voting.

How it works

When a new comment is posted(or edited) in a PR, the workflow will:

  1. Check if the PR is yet to be merged and not in draft status
  2. Count how many comments containing the command /force-merge were posted. Only repo maintainer votes will be counted (this is not a democracy) and duplicates will be discarded.
  3. Set a label to the PR with the number of counted votes
  4. If enough votes are reached, the workflow will merge the PR bypassing the branch protection rules.

Possible improvements

  • Instead of relying on the author_associtation to grant vote rights we can create a new organization team and have that only belonging to that team will grant you voting rights. This offers more granularity and flexibility at the expense of an additional REST API call and some more admin work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant