-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turns out the PR template does not allow for frontmatter which would set a label on the PRs. As I'd prefer all new (non-draft) PRs to be marked with `Status: triage`, I went looking for an action which could do this and ended up with an action which can do a lot more. Again, let's give it a try and see how it goes. Ref: https://github.com/srvaroa/labeler
- Loading branch information
Showing
3 changed files
with
100 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
version: 1 | ||
appendOnly: true | ||
labels: | ||
- label: "Status: triage" | ||
draft: False | ||
author-can-merge: False | ||
|
||
- label: "Core Component: Config & Ruleset & CLI options" | ||
draft: False | ||
files: | ||
- "src/Config.php$" | ||
- label: "Core Component: Config & Ruleset & CLI options" | ||
draft: False | ||
files: | ||
- "src/Ruleset.php$" | ||
- label: "Core Component: File" | ||
draft: False | ||
files: | ||
- "src/Files/.*" | ||
- label: "Core Component: Fixer" | ||
draft: False | ||
files: | ||
- "src/Fixer.php$" | ||
- label: "Core Component: Reports" | ||
draft: False | ||
files: | ||
- "src/Reports/.*" | ||
- label: "Core Component: Tokenizer" | ||
draft: False | ||
files: | ||
- "src/Tokenizers/.*" | ||
- label: "Core Component: Utils" | ||
draft: False | ||
files: | ||
- "src/Util/.*" | ||
|
||
- label: "Focus: Comments/Docblocks" | ||
draft: False | ||
files: | ||
- "src/Standards/.*/Sniffs/Commenting/" | ||
- label: "Focus: Fixer Conflicts" | ||
draft: False | ||
body: ".* fixer conflict.*" | ||
|
||
- label: "Standard: Generic" | ||
draft: False | ||
files: | ||
- "src/Standards/Generic/.*" | ||
- label: "Standard: MySource" | ||
draft: False | ||
files: | ||
- "src/Standards/MySource/.*" | ||
- label: "Standard: PEAR" | ||
draft: False | ||
files: | ||
- "src/Standards/PEAR/.*" | ||
- label: "Standard: PSR1" | ||
draft: False | ||
files: | ||
- "src/Standards/PSR1/.*" | ||
- label: "Standard: PSR2" | ||
draft: False | ||
files: | ||
- "src/Standards/PSR2/.*" | ||
- label: "Standard: PSR12" | ||
draft: False | ||
files: | ||
- "src/Standards/PSR12/.*" | ||
- label: "Standard: Squiz" | ||
draft: False | ||
files: | ||
- "src/Standards/Squiz/.*" | ||
- label: "Standard: Zend" | ||
draft: False | ||
files: | ||
- "src/Standards/Zend/.*" | ||
|
||
- label: "Type: bug" | ||
draft: False | ||
body: ".* bug .*" | ||
- label: "Type: documentation" | ||
draft: False | ||
files: | ||
- "/Docs/[A-Za-z0-9-]*/.*Standard.xml$" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
labels: ['Status: triage'] | ||
--- | ||
|
||
<!-- Provide a general summary of your changes in the title above. --> | ||
|
||
<!-- | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Label new PRs | ||
|
||
on: | ||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target | ||
pull_request_target: | ||
types: | ||
- unlabeled | ||
|
||
jobs: | ||
label-new-prs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: srvaroa/labeler@master | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |