Update branching.yml #46
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: Pull Request Checklist | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- edited | |
issue_comment: | |
types: | |
- created | |
- edited | |
jobs: | |
checklist: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Check Checklist | |
run: | | |
checklist=$(echo "${{ github.event.pull_request.body }}" | sed -n '/## Checklist/,/<!--/p' | sed '$d') | |
# Check if "Added tests" is marked | |
if echo "${checklist}" | grep -q "\- \[[xX]\] Added tests"; then | |
echo "The 'Added tests' checkbox is marked." | |
# Perform actions specific to "Added tests" | |
else | |
echo "The 'Added tests' checkbox is not marked." | |
# Perform actions for when "Added tests" is not marked | |
exit 1 | |
fi |