Skip to content

Commit

Permalink
Auto-label new issues based on MDN URLs in description (mdn#14212)
Browse files Browse the repository at this point in the history
* Auto-label new issues based on MDN URLs in description

This change causes appropriate labels to be automatically added (using a
GitHub Action) to new issues based on matches for particular MDN URL
pathnames/slugs found anywhere in the issue descriptions.

* Make this only affect labels for new issues (type=opened), not existing issues

Co-authored-by: Schalk Neethling <[email protected]>
  • Loading branch information
sideshowbarker and Schalk Neethling authored May 11, 2022
1 parent 496f745 commit 3ade390
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/issue-regex-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Content:Accessibility:
- '/docs/Web/Accessibility'
Content:CSS:
- '/docs/Web/CSS'
Content:Events:
- '/docs/Web/Events'
Content:Glossary:
- '/docs/Glossary'
Content:HTML:
- '/docs/Web/HTML'
Content:HTTP:
- '/docs/Web/HTTP'
Content:JS:
- '/docs/Web/JavaScript'
Content:Learn:
- '/docs/Learn/(Common|Front|Getting|Learning|Performance)'
Content:Learn:Accessibility:
- '/docs/Learn/Accessibility'
Content:Learn:Client-side:
- '/docs/Learn/Tools_and_testing/(Client-side|Understanding_client-side)'
Content:Learn:Cross-Browser-Testing:
- '/docs/Learn/Tools_and_testing/Cross_browser_testing'
Content:Learn:CSS:
- '/docs/Learn/CSS'
Content:Learn:Django:
- '/docs/Learn/Server-side/Django'
Content:Learn:Forms:
- '/docs/Learn/Forms'
Content:Learn:GitHub:
- '/docs/Learn/Tools_and_testing/GitHub'
Content:Learn:HTML:
- '/docs/Learn/HTML'
Content:Learn:JavaScript:
- '/docs/Learn/JavaScript'
Content:Manifest:
- '/docs/Web/Manifest'
Content:Performance:
- '/docs/Web/Performance'
Content:Security:
- '/docs/Web/Security'
Content:SVG:
- '/docs/Web/SVG'
Content:wasm:
- '/docs/WebAssembly'
Content:WebAPI:
- '/docs/Web/API'
Content:WebDriver:
- '/docs/Web/WebDriver'
Content:WebExt:
- '/docs/Mozilla/Add-ons'
14 changes: 14 additions & 0 deletions .github/workflows/issue-regex-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Label issues by MDN URL or other regex match in issue description"
on:
issues:
types: [opened]

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: github/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/issue-regex-labeler.yml
enable-versioned-regex: 0

0 comments on commit 3ade390

Please sign in to comment.