Skip to content

Commit 4ac5785

Browse files
authored
Merge pull request #44 from PHPCSStandards/feature/ghactions-more-label-management
GH Actions: automate more label management
2 parents c719944 + 0c6e0b4 commit 4ac5785

File tree

5 files changed

+120
-4
lines changed

5 files changed

+120
-4
lines changed

.github/labeler.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
version: 1
2+
appendOnly: true
3+
labels:
4+
- label: "Status: triage"
5+
draft: False
6+
author-can-merge: False
7+
8+
- label: "Core Component: Config & Ruleset & CLI options"
9+
draft: False
10+
files:
11+
- "src/Config.php$"
12+
- label: "Core Component: Config & Ruleset & CLI options"
13+
draft: False
14+
files:
15+
- "src/Ruleset.php$"
16+
- label: "Core Component: File"
17+
draft: False
18+
files:
19+
- "src/Files/.*"
20+
- label: "Core Component: Fixer"
21+
draft: False
22+
files:
23+
- "src/Fixer.php$"
24+
- label: "Core Component: Reports"
25+
draft: False
26+
files:
27+
- "src/Reports/.*"
28+
- label: "Core Component: Tokenizer"
29+
draft: False
30+
files:
31+
- "src/Tokenizers/.*"
32+
- label: "Core Component: Utils"
33+
draft: False
34+
files:
35+
- "src/Util/.*"
36+
37+
- label: "Focus: Comments/Docblocks"
38+
draft: False
39+
files:
40+
- "src/Standards/.*/Sniffs/Commenting/"
41+
- label: "Focus: Fixer Conflicts"
42+
draft: False
43+
body: ".* fixer conflict.*"
44+
45+
- label: "Standard: Generic"
46+
draft: False
47+
files:
48+
- "src/Standards/Generic/.*"
49+
- label: "Standard: MySource"
50+
draft: False
51+
files:
52+
- "src/Standards/MySource/.*"
53+
- label: "Standard: PEAR"
54+
draft: False
55+
files:
56+
- "src/Standards/PEAR/.*"
57+
- label: "Standard: PSR1"
58+
draft: False
59+
files:
60+
- "src/Standards/PSR1/.*"
61+
- label: "Standard: PSR2"
62+
draft: False
63+
files:
64+
- "src/Standards/PSR2/.*"
65+
- label: "Standard: PSR12"
66+
draft: False
67+
files:
68+
- "src/Standards/PSR12/.*"
69+
- label: "Standard: Squiz"
70+
draft: False
71+
files:
72+
- "src/Standards/Squiz/.*"
73+
- label: "Standard: Zend"
74+
draft: False
75+
files:
76+
- "src/Standards/Zend/.*"
77+
78+
- label: "Type: bug"
79+
draft: False
80+
body: ".* bug .*"
81+
- label: "Type: documentation"
82+
draft: False
83+
files:
84+
- "/Docs/[A-Za-z0-9-]*/.*Standard.xml$"

.github/pull_request_template.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
labels: ['Status: triage']
3-
---
4-
51
<!-- Provide a general summary of your changes in the title above. -->
62

73
<!--
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check PRs for merge conflicts
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
check-prs:
10+
runs-on: ubuntu-latest
11+
if: github.repository_owner == 'PHPCSStandards'
12+
13+
name: Check PRs for merge conflicts
14+
15+
steps:
16+
- uses: mschilde/auto-label-merge-conflicts@master
17+
with:
18+
CONFLICT_LABEL_NAME: "Status: has merge conflict"
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/label-new-prs.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Label new PRs
2+
3+
on:
4+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
5+
pull_request_target:
6+
types:
7+
- opened
8+
- ready_for_review
9+
10+
jobs:
11+
label-new-prs:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: srvaroa/labeler@master
16+
env:
17+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)