From 1e5823c2b7a0e320f75998a48f81471b068bde14 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 14 Feb 2024 10:47:41 +0100 Subject: [PATCH 1/2] update workflow --- .github/workflows/pr-labels.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 23bc20be47f..0e6b5907522 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -11,25 +11,28 @@ jobs: steps: - name: Set up python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 - name: Install requests run: pip install requests - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Process commit and find merger responsible for labeling id: commit - run: echo "merger=$(python .github/process_commit.py ${{ github.sha }})" >> $GITHUB_OUTPUT + run: | + MERGER=$(python .github/process_commit.py ${{ github.sha }}) + echo "merger=${MERGER}" | tee --append $GITHUB_OUTPUT - name: Ping merger responsible for labeling if necessary if: ${{ steps.commit.outputs.merger != '' }} - uses: mshick/add-pr-comment@v1 + uses: mshick/add-pr-comment@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: message: | Hey ${{ steps.commit.outputs.merger }}! - You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py + You merged this PR, but no labels were added. + The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py From 3b625a53a400c344f0195387ce4c997ff00b0022 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 14 Feb 2024 10:55:20 +0100 Subject: [PATCH 2/2] add permissions --- .github/workflows/pr-labels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 0e6b5907522..bf6349ab02e 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -8,6 +8,8 @@ on: jobs: is-properly-labeled: runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - name: Set up python