Allow `ok-to-test` label to approve GitHub workflow runs for new contributors #25210
Original Issue: https://github.com/kubernetes/test-infra/issues/25210
What would you like to be added:
The ability for Prow to approve GitHub workflow runs after the ok-to-test label has been added to a PR via GitHub's API https://docs.github.com/en/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request
Why is this needed:
New contributors are blocked from running GitHub workflows even after a maintainer adds the ok-to-test label to a PR and contributors shouldn't need to rely on GUI access to approve workflow runs knative/test-infra/issues/3057
/sig contributor-experience
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale This is still valid request. There is a workaround, but it would be nicer if it was an actual feature in Prow.
I'm from volcano community, we also wish to have this feature. Currently, the first PR from outside contributors must be approved by our owner and then trigger the github workflows, which contain some e2e testing. We wish that when there is /ok-to-test labeled, the workflows can be triggered, not keep waiting for the owner to approve.
Hi, @tuminoid , how do you solve this problem? Are there any best practices so far? Thanks.
Hi, @tuminoid , how do you solve this problem? Are there any best practices so far? Thanks.
We are using this: https://github.com/kubernetes/test-infra/issues/25210#issuecomment-2039476449 as there is no better alternative right now.
OK, thanks, I think currently this action is enough to help our community, hope that prow will implement this feature one day. Seems that there are multiple communities hoping to combine prow and github workflows.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
For those who need a workaround, I have improved on the "workflow to trigger workflows" approach in the Kubeflow Notebooks repo.
See the workflow YAML here:
- https://github.com/kubeflow/notebooks/blob/6d04cffd61564b09ef4180a433ad9f09c2a6850b/.github/workflows/gh-workflow-approve.yaml
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
/assign