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

Automatically label issues based on regular expression matches in title and description #38107

Merged
merged 1 commit into from
May 13, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This is a mapping of labels to title/description regex patterns used by
# https://github.com/github/issue-labeler to automatically add labels to issues
# when opened/edited.
#
# If multiple patterns are provided in the list for a label, they all have to
# match. A label can only occur once.
#
# To label when any one of multiple patterns matches, concatenate the patterns
# using a "|" delimeter, to form a single pattern.
#
# "^" appears to match only the beginning of the issue title.
#
# Automatic label removal is currently disabled, because it also removes
# manually added labels that didn't have matches.

crash:
- '^Crash Report|Crash ID: crash/'

OS/Linux:
- 'OS[|:\s]+Linux|Operating System:\s+Linux'

OS/Windows:
- 'OS[|:\s]+Windows|Operating System:\s+Windows NT'

OS/macOS:
- 'OS[|:\s]+Mac OS|Operating System:\s+Mac OS X'

OS/Android:
- 'OS[|:\s]+Android|Operating System:\s+Android'

OS/iOS:
- 'OS[|:\s]+iOS|Device/OS:\s+iPhone|Operating System:\s+iOS'
18 changes: 18 additions & 0 deletions .github/workflows/assign-issue-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Assign issue labels
on:
issues:
types: [opened, edited]

permissions:
issues: write
contents: read

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
with:
enable-versioned-regex: 0
include-title: 1
#sync-labels: 1 # This removes also manually added labels on edit