File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020permissions : write-all
2121jobs :
22- # Create TestRail run
23- create-testrail-run :
24- name : Create TestRail Run
25- uses : ./.github/workflows/create-testrail-run .yaml
22+ # PR title check
23+ pr-title-check :
24+ name : Check PR title
25+ uses : ./.github/workflows/pr-title-check .yaml
2626 secrets :
2727 TESTRAIL_USERNAME : ${{ secrets.TESTRAIL_USERNAME }}
2828 TESTRAIL_API_KEY : ${{ secrets.TESTRAIL_API_KEY }}
3131 build-and-test :
3232 name : Build and test
3333 uses : ./.github/workflows/build-and-test.yaml
34- needs : create-testrail-run
34+ needs : pr-title-check
3535 secrets :
3636 SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
3737 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
4545 name : Integration tests
4646 uses : ./.github/workflows/integration-tests.yaml
4747 if : ${{ vars.ENABLE_INTEGRATION_TESTS == 'true' }}
48- needs : create-testrail-run
48+ needs : pr-title-check
4949 secrets :
5050 E2E_CONFIG : ${{ secrets.E2E_CONFIG }}
5151 SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
Original file line number Diff line number Diff line change 1+ name : PR Title Check
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ pr-title-check :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Validate PR title starts with Jira key
11+ shell : bash
12+ run : |
13+ set -euo pipefail
14+ TITLE="${{ github.event.pull_request.title }}"
15+ echo "PR title: $TITLE"
16+
17+ # Require: SDKS-<digits> <space> <anything>
18+ PATTERN='^SDKS-[0-9]+[[:space:]].+'
19+
20+ if [[ ! "$TITLE" =~ $PATTERN ]]; then
21+ echo "::error::PR title must start with 'SDKS-<number> ' (example: 'SDKS-4770 Aligning storage strategy with Android')."
22+ exit 1
23+ fi
24+
25+ echo "Title OK"
You can’t perform that action at this time.
0 commit comments