Skip to content

Commit e932fd6

Browse files
committed
add label to external PR
1 parent ef2bec0 commit e932fd6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/add-new-pr-to-oss-triaging.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
types: [opened, reopened]
55

66
env:
7+
EXTERNAL_PR_LABEL: external-contributor
78
PROJECT_URL: https://github.com/orgs/stackrox/projects/3 # Test board for PR automation
89
# PROJECT_URL: https://github.com/orgs/stackrox/projects/2 # OSS Triaging board
910

@@ -18,19 +19,24 @@ jobs:
1819
outputs:
1920
is_external_pr: ${{ steps.check-external-pr.outputs.is_external_pr }}
2021
steps:
22+
- name: Check out code
23+
uses: actions/checkout@v3
2124
- id: check-external-pr
2225
run: |
2326
set -uo pipefail
2427
if [[ $BASE_REPO != $HEAD_REPO ]]; then
2528
echo "::set-output name=is_external_pr::true"
29+
gh pr edit \
30+
${{ github.event.pull_request.number }} \
31+
--add-label ${EXTERNAL_PR_LABEL}
2632
else
2733
echo "::set-output name=is_external_pr::false"
2834
fi
2935
3036
add-to-project:
3137
name: Add pull request to project
3238
runs-on: ubuntu-latest
33-
needs: [check-pr-if-externall]
39+
needs: [check-pr-if-external]
3440
if: needs.check-pr-if-external.outputs.is_external_pr == 'true'
3541
steps:
3642
- uses: actions/add-to-project@v0.3.0

0 commit comments

Comments
 (0)