This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
build(deps-dev): bump ruff from 0.5.1 to 0.5.2 #107
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pr-labels | |
on: | |
pull_request: | |
branches: main | |
types: closed | |
jobs: | |
is-properly-labeled: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
issues: write | |
steps: | |
- uses: actions/setup-python@v5 | |
- name: Install requests | |
run: pip install requests | |
- uses: actions/checkout@v4 | |
- name: Process commit and find merger responsible for labeling | |
id: commit | |
run: | | |
MERGER=$(python .github/verify_labels.py ${{ github.event.pull_request.number }}) | |
echo "merger=${MERGER}" | tee --append $GITHUB_OUTPUT | |
- name: Comment PR | |
uses: actions/github-script@v7 | |
if: ${{ steps.commit.outputs.merger != '' }} | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const { issue: { number: issue_number }, repo: { owner, repo } } = context; | |
github.rest.issues.createComment({ | |
issue_number, | |
owner, | |
repo, | |
body: 'Hey ${{ steps.commit.outputs.merger }} 👋\nYou merged this PR, but it is not correctly labeled. The list of valid labels is available at https://github.com/quack-ai/companion/blob/main/.github/verify_labels.py' | |
}); |