Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pr-labels workflow #8272

Merged
merged 2 commits into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,33 @@ on:
jobs:
is-properly-labeled:
runs-on: ubuntu-latest
permissions:
pull-requests: write

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
Loading