Skip to content

Commit fdc4466

Browse files
sophiethekinggithub-actionsbvennamguntrip
authored
[14-11-2022]: Allow admins to require approval on fork PR in private repos - [GA] (#32442)
Co-authored-by: github-actions <[email protected]> Co-authored-by: Belinda Vennam <[email protected]> Co-authored-by: Steve Guntrip <[email protected]>
1 parent 14bfa57 commit fdc4466

8 files changed

+41
-11
lines changed
Loading
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Approving workflow runs from private forks
3+
intro: 'When someone without write access submits a pull request to a private repository, a maintainer may need to approve any workflow runs.'
4+
permissions: 'Maintainers with write access to a repository can approve workflow runs.'
5+
versions:
6+
feature: actions-private-fork-workflow-approvals
7+
shortTitle: Approve private fork runs
8+
---
9+
10+
## About workflow runs from private forks
11+
12+
{% data reusables.actions.private-repository-forks-overview %} For more information, see "[Enforcing a policy for fork pull requests in private repositories](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-fork-pull-requests-in-private-repositories)."
13+
14+
## Approving workflow runs on a pull request from a private fork
15+
16+
{% data reusables.actions.workflows.approve-workflow-runs %}

content/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,4 @@ Workflow runs that have been awaiting approval for more than 30 days are automat
1717

1818
## Approving workflow runs on a pull request from a public fork
1919

20-
Maintainers with write access to a repository can use the following procedure to review and run workflows on pull requests from contributors that require approval.
21-
22-
{% data reusables.repositories.sidebar-pr %}
23-
{% data reusables.repositories.choose-pr-review %}
24-
{% data reusables.repositories.changed-files %}
25-
1. Inspect the proposed changes in the pull request and ensure that you are comfortable running your workflows on the pull request branch. You should be especially alert to any proposed changes in the `.github/workflows/` directory that affect workflow files.
26-
1. If you are comfortable with running workflows on the pull request branch, return to the {% octicon "comment-discussion" aria-label="The discussion icon" %} **Conversation** tab, and under "Workflow(s) awaiting approval", click **Approve and run**.
27-
28-
![Approve and run workflows](/assets/images/help/pull_requests/actions-approve-and-run-workflows-from-fork.png)
20+
{% data reusables.actions.workflows.approve-workflow-runs %}

content/actions/managing-workflow-runs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ children:
1818
- /re-running-workflows-and-jobs
1919
- /canceling-a-workflow
2020
- /approving-workflow-runs-from-public-forks
21+
- /approving-workflow-runs-from-private-forks
2122
- /reviewing-deployments
2223
- /disabling-and-enabling-a-workflow
2324
- /skipping-workflow-runs
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reference: #8433
2+
# Allow admins to require approval on fork PR in private repos
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>= 3.8'
7+
ghae: '>= 3.8'
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
1. Under **Fork pull request workflows**, select your options. For example:
2-
![Enable, disable, or limits actions for this repository](/assets/images/help/settings/actions-fork-pull-request-workflows.png)
2+
{% ifversion actions-private-fork-workflow-approvals %}
3+
![Enable, disable, or limits actions for this repository](/assets/images/help/settings/actions-fork-pull-request-workflows-require-approval.png){% else %}
4+
5+
![Enable, disable, or limits actions for this repository](/assets/images/help/settings/actions-fork-pull-request-workflows.png){% endif %}
6+
37
1. Click **Save** to apply the settings.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
- **Run workflows from fork pull requests** - Allows users to run workflows from fork pull requests, using a `GITHUB_TOKEN` with read-only permission, and with no access to secrets.
22
- **Send write tokens to workflows from pull requests** - Allows pull requests from forks to use a `GITHUB_TOKEN` with write permission.
3-
- **Send secrets to workflows from pull requests** - Makes all secrets available to the pull request.
3+
- **Send secrets to workflows from pull requests** - Makes all secrets available to the pull request.{% ifversion actions-private-fork-workflow-approvals %}
4+
- **Require approval for fork pull request workflows** - Workflow runs on pull requests from collaborators without write permission will require approval from someone with write permission before they will run.{% endif %}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Maintainers with write access to a repository can use the following procedure to review and run workflows on pull requests from contributors that require approval.
2+
3+
{% data reusables.repositories.sidebar-pr %}
4+
{% data reusables.repositories.choose-pr-review %}
5+
{% data reusables.repositories.changed-files %}
6+
1. Inspect the proposed changes in the pull request and ensure that you are comfortable running your workflows on the pull request branch. You should be especially alert to any proposed changes in the `.github/workflows/` directory that affect workflow files.
7+
1. If you are comfortable with running workflows on the pull request branch, return to the {% octicon "comment-discussion" aria-label="The discussion icon" %} **Conversation** tab, and under "Workflow(s) awaiting approval", click **Approve and run**.
8+
9+
![Approve and run workflows](/assets/images/help/pull_requests/actions-approve-and-run-workflows-from-fork.png)

0 commit comments

Comments
 (0)