Skip to content

Commit

Permalink
Add auto-labelling to pull requests (#531)
Browse files Browse the repository at this point in the history
* GitHub: add auto-labelling to pull requests

* add Markdown; add python/; update action version

* use pull_request_target

* update after review feedback

* use docs label for docs

* update for actions/labeler@v5 with added review suggestions

---------

Co-authored-by: Markus Neteler <neteler@gmail.com>
Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
  • Loading branch information
3 people committed Dec 30, 2023
1 parent bdf631b commit 6b4c665
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
libraries:
- changed-files:
- any-glob-to-any-file:
- lib/**/*
- include/grass/*
- include/grass/**/*
- python/**/*
module:
- changed-files:
- any-glob-to-any-file:
- db/**/*
- display/**/*
- general/**/*
- imagery/**/*
- misc/**/*
- ps/**/*
- raster/**/*
- raster3d/**/*
- scripts/**/*
- temporal/**/*
- vector/**/*
vector:
- changed-files:
- any-glob-to-any-file: vector/**/*
raster:
- changed-files:
- any-glob-to-any-file: raster/**/*
temporal:
- changed-files:
- any-glob-to-any-file: temporal/**/*
database:
- changed-files:
- any-glob-to-any-file: db/**/*
GUI:
- changed-files:
- any-glob-to-any-file: gui/**/*
Windows:
- changed-files:
- any-glob-to-any-file: mswindows/**/*
macOS:
- changed-files:
- any-glob-to-any-file: macosx/**/*
Linux:
- changed-files:
- any-glob-to-any-file: singularity/**/*
docker:
- changed-files:
- any-glob-to-any-file: docker/**/*
docs:
- changed-files:
- any-glob-to-any-file:
- doc/**/*
- man/**/*
RFC:
- changed-files:
- any-glob-to-any-file: doc/development/rfc/*
translation:
- changed-files:
- any-glob-to-any-file: locale/**/*
CI:
- changed-files:
- any-glob-to-any-file:
- .github/**/*
- .travis/**/*

# based on file types
Python:
- changed-files:
- any-glob-to-any-file: '**/*.py'
C:
- changed-files:
- any-glob-to-any-file: '**/*.c'
C++:
- changed-files:
- any-glob-to-any-file: '**/*.cpp'
CSS:
- changed-files:
- any-glob-to-any-file: '**/*.css'
HTML:
- changed-files:
- any-glob-to-any-file: '**/*.html'
JavaScript:
- changed-files:
- any-glob-to-any-file: '**/*.js'
Markdown:
- changed-files:
- any-glob-to-any-file: '**/*.md'
25 changes: 25 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Pull Request Labeler

# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler/blob/master/README.md

on:
- pull_request_target

permissions: {}

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
sync-labels: true

0 comments on commit 6b4c665

Please sign in to comment.