Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: automate more label management #44

Merged
merged 3 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}"