diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 8e050404e..be409e020 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,20 +1,18 @@ categories: - - title: '🚀 Features' + - title: "🚀 Features" labels: - - 'type: enhancement' - - 'type: epic' - - 'type: feature request' - - title: '🐛 Bug Fixes' + - "type: feature request" + - "type: enhancement" + - "type: epic" + - title: "🐛 Fixes" labels: - - 'type: bug' - - title: '🧰 Maintenance' - labels: - - 'type: chore' - - 'type: ci' - - title: '📖 Documentaion' - labels: - - 'type: documentation' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' + - "type: bug" + - title: "🧰 Maintenance" + labels: + - "type: chore" + - "type: ci" + - "type: documentation" +change-template: "- $TITLE @$AUTHOR (#$NUMBER)" change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. template: | ## Changes diff --git a/.github/workflows/auto-assign-author.yml b/.github/workflows/auto-assign-author.yml new file mode 100644 index 000000000..0e861df00 --- /dev/null +++ b/.github/workflows/auto-assign-author.yml @@ -0,0 +1,14 @@ +# Auto assign author, tags, and reviewers to pull requests +name: "Auto Assign Author" +on: + pull_request: + types: [opened] +jobs: + assign-author: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: toshimaru/auto-author-assign@v1.1.0 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/auto-label-conventional-commits.yaml b/.github/workflows/auto-label-conventional-commits.yaml new file mode 100644 index 000000000..7e6e19a66 --- /dev/null +++ b/.github/workflows/auto-label-conventional-commits.yaml @@ -0,0 +1,40 @@ +name: "Auto Label Conventional Commits" +on: + issues: + types: + - reopened + - opened + pull_request: + types: + - reopened + - opened +jobs: + label_issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Label issues + run: | + ISSUE_TITLE=$(gh issue view ${{ github.event.number }} --json title -q ".title") + case "$ISSUE_TITLE" in + chore:*) LABEL="type: chore" ;; + feat:*) LABEL="type: feature request" ;; + perf:*) LABEL="type: enhancement" ;; + fix:*) LABEL="type: bug" ;; + docs:*) LABEL="type: documentation" ;; + ci:*) LABEL="type: ci" ;; + build:*) LABEL="type: ci" ;; + test:*) LABEL="type: chore" ;; + style:*) LABEL="type: chore" ;; + refactor:*) LABEL="type: chore" ;; + *) LABEL="" ;; + esac + if [ -n "$LABEL" ]; then + gh issue edit ${{ github.event.number }} --add-label "$LABEL" + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}