Fix: Adding newline at the end of a block so that it gets rendered #4
Workflow file for this run
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: PR Title Check | |
on: | |
pull_request: | |
types: [opened, edited, synchronize, reopened] | |
jobs: | |
check-pr-title: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Nushell | |
uses: hustcer/setup-nu@v3 | |
with: | |
version: 0.94.1 | |
- name: Check PR Title | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
run: | | |
nu -c ' | |
let title = $env.PR_TITLE | |
let regex = "^(Fix|Feature|Documentation|Improvement):.+" | |
if ($title | str contains -r $regex) { | |
print "PR title is correctly formatted." | |
exit 0 | |
} else { | |
print "PR title does not match the required format. It should start with one of: Fix:, Feature:, Documentation:, or Improvement:" | |
exit 1 | |
} | |
' |