Skip to content

Commit

Permalink
fix: update external-contributor triaging workflow (#1496)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommartensen authored May 7, 2024
1 parent e720a58 commit 127dd69
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/add-new-pr-to-oss-triaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:

env:
EXTERNAL_PR_LABEL: external-contributor
PROJECT_URL: https://github.com/orgs/stackrox/projects/2 # OSS Triaging board

jobs:
check-pr-if-external:
Expand All @@ -15,30 +14,14 @@ jobs:
GH_TOKEN: ${{ github.token }}
BASE_REPO: ${{ github.repository }}
HEAD_REPO: ${{ github.event.pull_request.head.user.login }}/${{ github.event.pull_request.head.repo.name }}
outputs:
is_external_pr: ${{ steps.check-external-pr.outputs.is_external_pr }}
steps:
- name: Check out code
uses: actions/checkout@v4
- id: check-external-pr
run: |
set -uo pipefail
if [[ $BASE_REPO != $HEAD_REPO ]]; then
echo "::set-output name=is_external_pr::true"
gh pr edit \
${{ github.event.pull_request.number }} \
--add-label ${EXTERNAL_PR_LABEL}
else
echo "::set-output name=is_external_pr::false"
fi
add-to-project:
name: Add pull request to project
runs-on: ubuntu-latest
needs: [check-pr-if-external]
if: needs.check-pr-if-external.outputs.is_external_pr == 'true'
steps:
- uses: actions/[email protected]
with:
project-url: ${{ env.PROJECT_URL }}
github-token: ${{ secrets.ADD_TO_PROJECT_TOKEN }}

0 comments on commit 127dd69

Please sign in to comment.