diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index 3c6319f5..1a0167a2 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -3,7 +3,7 @@ on: - pull_request_target jobs: - labeler: + file-change: permissions: contents: read pull-requests: write @@ -11,6 +11,15 @@ jobs: steps: - name: Run Labeler Action uses: actions/labeler@v5 + + sync: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 - name: Sync labels with closing issues run: | owner="pymc-labs" @@ -36,3 +45,5 @@ jobs: ' --jq '.data.repository.pullRequest.closingIssuesReferences.nodes | map(.labels.nodes | map(.name)) | flatten | unique | join(",")') gh pr edit $pr_number --add-label "$labels" + env: + GH_TOKEN: ${{ github.token }}