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+
2223 # Create TestRail run
2324 create-testrail-run :
2425 name : Create TestRail Run
@@ -27,11 +28,17 @@ jobs:
2728 TESTRAIL_USERNAME : ${{ secrets.TESTRAIL_USERNAME }}
2829 TESTRAIL_API_KEY : ${{ secrets.TESTRAIL_API_KEY }}
2930
31+ # PR title check
32+ pr-title-check :
33+ name : Check PR title
34+ uses : ./.github/workflows/pr-title-check.yaml
35+ needs : create-testrail-run
36+
3037 # Build and run unit tests
3138 build-and-test :
3239 name : Build and test
3340 uses : ./.github/workflows/build-and-test.yaml
34- needs : create-testrail-run
41+ needs : pr-title-check
3542 secrets :
3643 SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
3744 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
4552 name : Integration tests
4653 uses : ./.github/workflows/integration-tests.yaml
4754 if : ${{ vars.ENABLE_INTEGRATION_TESTS == 'true' }}
48- needs : create-testrail-run
55+ needs : pr-title-check
4956 secrets :
5057 E2E_CONFIG : ${{ secrets.E2E_CONFIG }}
5158 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