Skip to content

Commit

Permalink
Automatically label PRs based on modified files
Browse files Browse the repository at this point in the history
Closes #6139
  • Loading branch information
michaelosthege authored and ricardoV94 committed Oct 13, 2022
1 parent 534b89b commit 04006e0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Add 'maintenance` label to any change to *.yml files
maintenance:
- any: ['**.yml', '']

# Add "no releasenotes" label if only the pre-commit config changed
no releasenotes:
- any: []
all: ['.pre-commit-config.yml']
2 changes: 2 additions & 0 deletions .github/workflows/autoupdate-pre-commit-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ jobs:
pre-commit autoupdate || (exit 0);
pre-commit run -a || (exit 0);
COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config"
COMMIT_NAME: "pymc-bot"
COMMIT_EMAIL: "pymc-devs@users.noreply.github.com"
PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}"
PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config"
14 changes: 14 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 04006e0

Please sign in to comment.