feat: ✨ add a setting for rest time #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Validate and Update PR Title" | |
on: | |
pull_request_target: | |
types: | |
- opened | |
- reopened | |
- edited | |
- synchronize | |
permissions: | |
pull-requests: write | |
jobs: | |
main: | |
name: Validate and Update PR title | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
- uses: amannn/action-semantic-pull-request@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
subjectPattern: ^(?![A-Z]).+$ | |
subjectPatternError: | | |
Please ensure that the subject doesn't start with an uppercase character. | |
- name: Install devmoji | |
run: npm install -g devmoji | |
- name: Update PR title with emoji | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
run: | | |
NEW_TITLE=$(echo "$PR_TITLE" | devmoji --format shortcode) | |
gh pr edit ${{ github.event.pull_request.number }} --title "$NEW_TITLE" |