Skip to content

Fix: Adding newline at the end of a block so that it gets rendered #4

Fix: Adding newline at the end of a block so that it gets rendered

Fix: Adding newline at the end of a block so that it gets rendered #4

Workflow file for this run

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
}
'