CSHARP-4918: Release notes automation #5
Workflow file for this run
This file contains hidden or 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 validation | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- edited | |
- labeled | |
- unlabeled | |
jobs: | |
pull-request-validation: | |
name: Pull Request validation. | |
runs-on: ubuntu-latest | |
steps: | |
- name: Validate label. | |
if: ${{ always() && github.event.pull_request.labels[0] == null }} | |
run: | | |
echo "Pull Request should have label assigned." | |
exit 1 | |
- name: Title should contain Jira ticket. | |
if: ${{ always() && !(contains(github.event.pull_request.title, 'CSHARP-')) }} | |
run: | | |
echo "Title should contain Jira ticket." | |
exit 1 | |
- name: Title should not end with period or elipses | |
if: ${{ always() && (endsWith(github.event.pull_request.title, '.') || endsWith(github.event.pull_request.title, '…')) }} | |
run: | | |
echo "Title should not end with a period or ellipses." | |
exit 1 |