Skip to content

Commit

Permalink
Merge pull request #809 from janhq/workflows
Browse files Browse the repository at this point in the history
chore: add gi automations
  • Loading branch information
freelerobot authored Dec 1, 2023
2 parents 1143bd3 + 1c76539 commit ea6af7f
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/auto-assign-author.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
40 changes: 40 additions & 0 deletions .github/workflows/auto-label-conventional-commits.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit ea6af7f

Please sign in to comment.