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

feature: add approve workflows action #3758

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JesseStutler
Copy link
Contributor

BackGround

When contributors from outside contribute their first PR to volcano repo, the repo admin has to click the approve and run button to run the CI, even the approvers don't have the permissions to run the CIs when they are not repo admin. And the volcano-bot cannot automatically run CIs, because the bot uses prow as the testing framework. Currently prow uses k8s' own testing framework, and its integration with github workflow is not so good. So, inspired by this issue: kubernetes-sigs/prow#194, and this config: https://github.com/kubernetes-sigs/cluster-api/blob/main/.github/workflows/pr-gh-workflow-approve.yaml, we can add a action, when there is ok-to-test label in this first PR(which is already reviewed by reviewers), this github workflow can be ran to call other workflows. Therefore, approvers can have the right to run CIs, not only the repo admin.

Testing

Test-1

Add ok-to-test label, Approve Workflow action can run:
image
And other workflows can run subsequently:
image

Test-2

Tag other labels, other workflows can't run, and Approve Workflows action is skipped
image

Test-3

PR to non release-** and master branch, ok-to-test label is useless, only PR to release-** and master branch is useful.
image

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign thor-wl
You can assign the PR to them by writing /assign @thor-wl in a comment when ready.

The full list of commands accepted by this bot can be found 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

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 30, 2024
@JesseStutler
Copy link
Contributor Author

/assign @Monokaix

@hwdef
Copy link
Member

hwdef commented Sep 30, 2024

Who has permission to add ok-to-test label?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants