Skip to content

Commit

Permalink
Automatically Label PRs Based on Files Changed (#105)
Browse files Browse the repository at this point in the history
* Automatically label PRs based on files changed

* Move labeler to it's a pull_request_target execution script

* Fix name of job to match others more closely

* Change name of label check to make the interface more understandable

* Add note about security

* Remove github_actions label as redundant

* Fix comment styling

---------

Co-authored-by: pearce8 <[email protected]>
  • Loading branch information
alecbcs and pearce8 authored Jan 8, 2024
1 parent d389f4f commit 35c2b9e
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
application:
- changed-files:
- any-glob-to-any-file:
- repo/**

ci:
- changed-files:
- any-glob-to-any-file:
- .github/**

configs:
- changed-files:
- any-glob-to-any-file:
- configs/**

dependencies:
- changed-files:
- any-glob-to-any-file:
- .github/worklflows/requirements/**
- pyproject.toml

docs:
- changed-files:
- any-glob-to-any-file:
- docs/**
- README.rst

experiment:
- changed-files:
- any-glob-to-any-file:
- experiments/**
21 changes: 21 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#-----------------------------------------------------------------------
# DO NOT modify unless you really know what you are doing.
#
# See https://stackoverflow.com/a/74959635 for more info.
# Talk to @alecbcs if you have questions/are not sure of a change's
# possible impact to security.
#-----------------------------------------------------------------------
name: label
on:
pull_request_target:
branches:
- develop

jobs:
pr:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9

0 comments on commit 35c2b9e

Please sign in to comment.