Skip to content

Commit

Permalink
Merge pull request #44 from PHPCSStandards/feature/ghactions-more-lab…
Browse files Browse the repository at this point in the history
…el-management

GH Actions: automate more label management
  • Loading branch information
jrfnl authored Nov 9, 2023
2 parents c719944 + 0c6e0b4 commit 4ac5785
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 4 deletions.
84 changes: 84 additions & 0 deletions .github/labeler.yml
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$"
4 changes: 0 additions & 4 deletions .github/pull_request_template.md
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. -->

<!--
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/label-merge-conflicts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check PRs for merge conflicts

on:
push:
branches:
- master

jobs:
check-prs:
runs-on: ubuntu-latest
if: github.repository_owner == 'PHPCSStandards'

name: Check PRs for merge conflicts

steps:
- uses: mschilde/auto-label-merge-conflicts@master
with:
CONFLICT_LABEL_NAME: "Status: has merge conflict"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/label-new-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Label new PRs

on:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
pull_request_target:
types:
- opened
- ready_for_review

jobs:
label-new-prs:
runs-on: ubuntu-latest

steps:
- uses: srvaroa/labeler@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
File renamed without changes.

0 comments on commit 4ac5785

Please sign in to comment.