diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml index 6e41d8aa2d808e5edd3e99bc67067ba5353b7b69..e19477a533be32aa8433ba406bcab244c8b9e9a9 100644 --- a/.github/workflows/label.yaml +++ b/.github/workflows/label.yaml @@ -13,3 +13,18 @@ jobs: with: configuration-path: .github/labeler.yaml repo-token: "${{ secrets.GITHUB_TOKEN }}" + + label-pr: + if: + ${{ github.event_name == 'opened' && + github.event.pull_request.head.repo.owner.login == 'secondlife' }} + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - run: gh pr edit "$NUMBER" --add-label "$LABELS" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.pull_request.number }} + LABELS: "team:viewer" diff --git a/.github/workflows/label_pr.yaml b/.github/workflows/label_pr.yaml deleted file mode 100644 index 68dba7cb0706a1e75cdc1854c0598589011435ad..0000000000000000000000000000000000000000 --- a/.github/workflows/label_pr.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Label PR with team:viewer when first opened -on: - pull_request: - types: - - opened -jobs: - label_pr: - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - run: gh pr edit "$NUMBER" --add-label "$LABELS" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_REPO: ${{ github.repository }} - NUMBER: ${{ github.event.pull_request.number }} - LABELS: "team:viewer"