mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[Github] Improve automatic new issue labelling (#65309)
This patch: * Replaces `andymckay/labeler` which does not appear to be maintained by github official solution * Removes the closed issue workflow which was disabled a few years ago and never fixed. * Adds a few rules to add label based on PR title, hopefully that can make triaging simpler. If that turns out to be useful, we can consider adding more rules for backends, etc. We could technically also pattern match the body of the issue but I'm concerned about trying to be _too_ clever. The new system is only triggered on PR open so manual labels should not be removed.
This commit is contained in:
parent
5463503ae1
commit
3301edf45d
20
.github/workflows/closed-issues.yml
vendored
20
.github/workflows/closed-issues.yml
vendored
@ -1,20 +0,0 @@
|
||||
name: Labeling closed issues
|
||||
on:
|
||||
workflow_dispatch
|
||||
# issues:
|
||||
# types: ['closed']
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
automate-issues-labels:
|
||||
permissions:
|
||||
issues: write # for andymckay/labeler to label issues
|
||||
pull-requests: write # for andymckay/labeler to label PRs
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'llvm/llvm-project'
|
||||
steps:
|
||||
- uses: andymckay/labeler@1.0.4
|
||||
with:
|
||||
remove-labels: 'awaiting-review'
|
32
.github/workflows/new-issues-labeler.yml
vendored
Normal file
32
.github/workflows/new-issues-labeler.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
'new issue':
|
||||
- '/.*/'
|
||||
|
||||
'clang':
|
||||
- '/\bclang(?!\-)\b/i'
|
||||
|
||||
'clang-format':
|
||||
- '/\bclang-format/i'
|
||||
|
||||
'clang-tidy':
|
||||
- '/\bclang-tidy/i'
|
||||
|
||||
'libc++':
|
||||
- '/libc[+x]{2}(?!\-)/i'
|
||||
|
||||
'libc++-abi':
|
||||
- '/libc[+x]{2}-abi/i'
|
||||
|
||||
'libc':
|
||||
- '/\blibc(?![-+])\b/i'
|
||||
|
||||
'flang':
|
||||
- '/\bflang(?!\-)\b/i'
|
||||
|
||||
'lld':
|
||||
- '/\blld(?!\-)\b/i'
|
||||
|
||||
'mlir':
|
||||
- '/\bmlir(?!\-)\b/i'
|
||||
|
||||
'bolt':
|
||||
- '/\bbolt(?!\-)\b/i'
|
13
.github/workflows/new-issues.yml
vendored
13
.github/workflows/new-issues.yml
vendored
@ -9,12 +9,15 @@ permissions:
|
||||
jobs:
|
||||
automate-issues-labels:
|
||||
permissions:
|
||||
issues: write # for andymckay/labeler to label issues
|
||||
pull-requests: write # for andymckay/labeler to label PRs
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'llvm/llvm-project'
|
||||
steps:
|
||||
- uses: andymckay/labeler@1.0.4
|
||||
- uses: github/issue-labeler@v3.2
|
||||
with:
|
||||
add-labels: 'new issue'
|
||||
ignore-if-labeled: true
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
configuration-path: .github/workflows/new-issues-labeler.yml
|
||||
include-title: 1
|
||||
include-body: 0
|
||||
sync-labels: 0
|
||||
enable-versioned-regex: 0
|
||||
|
Loading…
Reference in New Issue
Block a user