Skip to content

Commit

Permalink
CI: Add autolabeler
Browse files Browse the repository at this point in the history
  • Loading branch information
qcasey committed Aug 11, 2022
1 parent 20671c7 commit a0617c1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
autolabeler:
- label: "bug"
branch:
- '/^fix/'
title:
- "/^fix/i"
- label: "enhancement"
branch:
- '/^feature/'
title:
- "/^feature/i"
categories:
- title: 'Breaking Changes'
labels:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/project-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- main
- dev

permissions:
contents: read

env:
todo: Todo
done: Done
Expand All @@ -35,6 +38,9 @@ jobs:
pr_opened_or_reopened:
name: pr_opened_or_reopened
runs-on: ubuntu-latest
permissions:
# write permission is required for autolabeler
pull-requests: write
if: github.event_name == 'pull_request_target' && (github.event.action == 'opened' || github.event.action == 'reopened')
steps:
- name: Set PR status to ${{ env.in_progress }}
Expand All @@ -45,3 +51,7 @@ jobs:
project_id: 2
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: ${{ env.in_progress }} # Target status
- name: Label PR with release-drafter
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a0617c1

Please sign in to comment.