Skip to content

Commit 07f13ab

Browse files
authored
[ci] Add workflow to label PRs from core team (#7451)
Reuses the main repo's workflow to label if a PR is opened by a core team member.
1 parent 7cdbed0 commit 07f13ab

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Label Core Team PRs
2+
3+
on:
4+
pull_request_target:
5+
6+
env:
7+
TZ: /usr/share/zoneinfo/America/Los_Angeles
8+
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
9+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
10+
11+
jobs:
12+
check_maintainer:
13+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
14+
with:
15+
actor: ${{ github.event.pull_request.user.login }}
16+
17+
label:
18+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
19+
runs-on: ubuntu-latest
20+
needs: check_maintainer
21+
steps:
22+
- name: Label PR as React Core Team
23+
uses: actions/github-script@v7
24+
with:
25+
script: |
26+
github.rest.issues.addLabels({
27+
owner: context.repo.owner,
28+
repo: context.repo.repo,
29+
issue_number: ${{ github.event.number }},
30+
labels: ['React Core Team']
31+
});

0 commit comments

Comments
 (0)