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

chore: add workflow to approve pr runs #11416

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

HumairAK
Copy link
Collaborator

@HumairAK HumairAK commented Nov 27, 2024

Description of your changes:

This is a workflow that, when a user comments on a pr it will do the following:

  1. If the comment is /ok-to-test it will:
    • Check if the user is a member or owner of the org,
    • if they are, then it will approve any pending runs for this PR
    • if they are not, nothing happens, a comment is left on the pr notifying the user of the requirements
  2. If the comment is not '/ok-to-test` the workflow will not schedule a job, but will still show up under Actions for the repo
  3. Because we use issue_comment trigger, it can be triggered on issue comments as well, if a user does /ok-to-test on an issue, then the workflow fails silently

The workflow is written to be extendible to other commands as the need arises. It's a very simple workflow, and in the future we may want a better alternative but this will at least remove the bottle neck on maintainers to approve workflow runs, and once again allow members to do this.

@HumairAK HumairAK requested review from hbelmiro and VaniHaripriya and removed request for rimolive and ouadakarim November 27, 2024 23:03
@github-actions github-actions bot added the ci-passed All CI tests on a pull request have passed label Nov 27, 2024
@HumairAK
Copy link
Collaborator Author

This is what it looks like:

image

@rimolive
Copy link
Member

/ok-to-test

Copy link
Contributor

@DharmitD DharmitD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

@hbelmiro hbelmiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hbelmiro

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit c00d213 into kubeflow:master Nov 28, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed All CI tests on a pull request have passed lgtm ok-to-test size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants