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

Approve all workflow runs for a specific contributor PR #3876

Merged
merged 14 commits into from
Oct 17, 2023

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Oct 16, 2023

What

This PR adds the ability to approve workflow runs on forks on any current and subsequent changes automatically. This is a step above the "don't approve any workflow runs on forks automatically" that we have set up right now.

The approval is triggered by commenting on a PR issue (issue_comment), or the usual PR activity (pull_request_target). It then looks through all comments on the PR, searching for the substring @rerun-bot approve. If it finds at least one, then it checks if the user that sent that comment is any of:

  • A repository owner
  • A member of the repository's organization
  • A repository collaborator

If that is the case, then it approves all workflow runs on that pull request.

PRs cannot modify this workflow or the script it uses to change how it works. The changes must first be merged into the default branch before having any effect, so this is safe for contributor PRs.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@jprochazk jprochazk added 🧑‍💻 dev experience developer experience (excluding CI) include in changelog labels Oct 16, 2023
@jprochazk jprochazk changed the title Auto-approve subsequent workflow runs Approve contributor workflow runs for a specific PR Oct 16, 2023
@jprochazk jprochazk changed the title Approve contributor workflow runs for a specific PR Approve all workflow runs for a specific contributor PR Oct 16, 2023
@jprochazk jprochazk marked this pull request as ready for review October 16, 2023 17:52
@jprochazk jprochazk marked this pull request as draft October 16, 2023 17:53
@jprochazk jprochazk marked this pull request as ready for review October 17, 2023 07:45
@jprochazk jprochazk merged commit 1e4d053 into main Oct 17, 2023
31 checks passed
@jprochazk jprochazk deleted the jan/auto-approve-workflow-runs branch October 17, 2023 08:01
@jprochazk jprochazk restored the jan/auto-approve-workflow-runs branch October 17, 2023 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant