We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent becc758 commit 1f5d90eCopy full SHA for 1f5d90e
.github/workflows/fork_labels.yml
@@ -0,0 +1,23 @@
1
+name: Add labels to PRs from forks
2
+
3
+on:
4
+ pull_request_target:
5
+ types: [opened, reopened, edited]
6
7
+jobs:
8
+ add_labels:
9
+ runs-on: self-hosted-docker-tiny
10
+ if: github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
11
+ steps:
12
+ - name: Add labels to PRs from forks
13
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
14
+ with:
15
+ script: |
16
+ const pr = context.payload.pull_request;
17
+ const labels = ['fork'];
18
+ await github.rest.issues.addLabels({
19
+ issue_number: pr.number,
20
+ owner: pr.base.repo.owner.login,
21
+ repo: pr.base.repo.name,
22
+ labels: labels,
23
+ });
0 commit comments