From b8c9eb0ec78473de5d7312f802d23153dba08972 Mon Sep 17 00:00:00 2001 From: James Ives Date: Fri, 5 Jul 2024 11:18:25 -0400 Subject: [PATCH] feat: :sparkles: adds pull request labeler --- .github/workflows/label.yml | 95 +++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/label.yml diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 000000000..e6cde3ee3 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,95 @@ +name: Label Pull Requests ๐Ÿท๏ธ + +on: + pull_request: + types: [opened, reopened, labeled, unlabeled] + +permissions: + pull-requests: write + contents: read + +jobs: + assign-labels: + runs-on: ubuntu-latest + name: Assign labels in pull request ๐Ÿท๏ธ + if: github.event.pull_request.merged == false + steps: + - name: Checkout ๐Ÿ›Ž๏ธ + uses: actions/checkout@v3 + + - name: Assign Labels ๐Ÿท๏ธ + id: action-assign-labels + uses: mauroalderete/action-assign-labels@v1 + with: + pull-request-number: ${{ github.event.pull_request.number }} + github-token: ${{ secrets.GITHUB_TOKEN }} + conventional-commits: | + conventional-commits: + - type: 'fix' + nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed'] + labels: ['bug ๐Ÿ', 'fix ๐Ÿ'] + - type: 'feature' + nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat'] + labels: ['feature โœจ'] + - type: 'breaking_change' + nouns: ['BREAKING CHANGE', 'BREAKING', 'MAJOR'] + labels: ['breaking ๐Ÿ’ฅ'] + - type: 'documentation' + nouns: ['doc', 'docu', 'document', 'documentation'] + labels: ['documentation ๐Ÿ“–'] + - type: 'build' + nouns: ['build', 'rebuild'] + labels: ['build ๐Ÿ”ง'] + - type: 'chore' + nouns: ['chore', 'tidy', 'cleanup'] + labels: ['chore ๐Ÿงน'] + - type: 'dependencies' + nouns: ['dependency', 'dependencies', 'package', 'packages', 'bump', 'dependabot'] + labels: ['dependencies ๐Ÿค–'] + - type: 'duplicate' + nouns: ['duplicate', 'dupe', 'copy'] + labels: ['duplicate 2๏ธโƒฃ'] + - type: 'good_first_issue' + nouns: ['good first issue', 'beginner', 'newcomer', 'first-timer'] + labels: ['good first issue ๐Ÿฉ'] + - type: 'help_wanted' + nouns: ['help wanted', 'need help', 'assistance required'] + labels: ['help wanted โ•'] + - type: 'proposal' + nouns: ['proposal', 'suggest', 'suggestion'] + labels: ['proposal ๐Ÿ”ฎ'] + - type: 'question' + nouns: ['question', 'inquiry', 'query'] + labels: ['question โ“'] + - type: 'test' + nouns: ['test', 'testing', 'tests'] + labels: ['test ๐Ÿงช'] + - type: 'triage' + nouns: ['triage', 'sort', 'prioritize'] + labels: ['triage โš ๏ธ'] + - type: 'wontfix' + nouns: ['wontfix', 'will not fix', 'not fixing'] + labels: ['wontfix ๐Ÿ”จ'] + - type: 'style' + nouns: ['style', 'formatting', 'format'] + labels: ['style ๐ŸŽ€'] + - type: 'security' + nouns: ['security', 'secure', 'safety'] + labels: ['security ๐Ÿ”’'] + - type: 'performance' + nouns: ['performance', 'speed', 'optimization'] + labels: ['performance ๐Ÿš€'] + - type: 'refactor' + nouns: ['refactor', 'refactoring', 'rework'] + labels: ['refactor ๐Ÿ› '] + - type: 'release' + nouns: ['release', 'deploy', 'deployment'] + labels: ['release ๐Ÿš€'] + - type: 'ci' + nouns: ['ci', 'continuous integration', 'CI/CD'] + labels: ['ci ๐Ÿš€'] + - type: 'hacktoberfest' + nouns: ['hacktoberfest', 'october', 'open source'] + labels: ['hacktoberfest ๐ŸŽƒ'] + maintain-labels-not-matched: false + apply-changes: true