99 branches :
1010 - master
1111 pull_request :
12+ types : [opened, edited, reopened, synchronize]
1213 branches :
1314 - master
1415
@@ -17,13 +18,13 @@ jobs:
1718 runs-on : [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
1819 steps :
1920 - name : Checkout repository
20- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 .0.0
21+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 .0.1
2122 - name : Set up Python
22- uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0 .0
23+ uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1 .0
2324 with :
2425 python-version-file : " pyproject.toml"
2526 - name : Install uv ${{ vars.UV_VERSION }}
26- uses : astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
27+ uses : astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a # v7.1.5
2728 with :
2829 enable-cache : true
2930 version : ${{ vars.UV_VERSION }}
3637 runs-on : [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
3738 steps :
3839 - name : Checkout repository
39- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 .0.0
40+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 .0.1
4041 - name : Check for trailing whitespace
4142 run : |
4243 if git grep -n '[[:blank:]]$'; then
4849 runs-on : [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
4950 steps :
5051 - name : Checkout repository
51- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 .0.0
52+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 .0.1
5253 - name : Set up Python
53- uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0 .0
54+ uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1 .0
5455 with :
5556 python-version-file : " pyproject.toml"
5657 - name : Check fork comments
@@ -60,13 +61,13 @@ jobs:
6061 runs-on : [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
6162 steps :
6263 - name : Checkout repository
63- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 .0.0
64+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 .0.1
6465 - name : Set up Python
65- uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0 .0
66+ uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1 .0
6667 with :
6768 python-version-file : " pyproject.toml"
6869 - name : Install uv ${{ vars.UV_VERSION }}
69- uses : astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
70+ uses : astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a # v7.1.5
7071 with :
7172 enable-cache : true
7273 version : ${{ vars.UV_VERSION }}
8283 name : test-results-framework-${{ github.run_number }}
8384 path : ./tests/core/pyspec/test-results-framework-${{ github.run_number }}
8485
86+ title :
87+ if : github.event_name == 'pull_request'
88+ runs-on : [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
89+ steps :
90+ - name : Check PR title
91+ env :
92+ PR_TITLE : ${{ github.event.pull_request.title }}
93+ run : |
94+
95+ echo "Checking PR title: $PR_TITLE"
96+
97+ # Check length (must be <= 68 characters)
98+ if [ ${#PR_TITLE} -gt 68 ]; then
99+ echo "PR title (${#PR_TITLE} characters) must be <= 68 characters"
100+ exit 1
101+ fi
102+
103+ # Check for leading or trailing whitespace
104+ if [[ "$PR_TITLE" =~ ^[[:space:]] ]] || [[ "$PR_TITLE" =~ [[:space:]]$ ]]; then
105+ echo "PR title must not have leading or trailing whitespace"
106+ exit 1
107+ fi
108+
109+ # Check for double spaces
110+ if [[ "$PR_TITLE" =~ [[:space:]]{2,} ]]; then
111+ echo "PR title must not contain double spaces"
112+ exit 1
113+ fi
114+
115+ # Check if starts with capital letter
116+ if ! [[ "$PR_TITLE" =~ ^[A-Z] ]]; then
117+ echo "PR title must start with a capital letter"
118+ exit 1
119+ fi
120+
121+ # Check if ends with punctuation
122+ if [[ "$PR_TITLE" =~ [.!?,\;]$ ]]; then
123+ echo "PR title must not end with punctuation"
124+ exit 1
125+ fi
126+
127+ # Check for correct tense (imperative mood)
128+ first_word=$(echo "$PR_TITLE" | awk '{print $1}')
129+ if [[ ! "$first_word" =~ ^(Embed|Shed)$ ]]; then
130+ if [[ "$first_word" =~ [^e]ed$ ]] || \
131+ [[ "$first_word" =~ ies$ ]] || \
132+ [[ "$first_word" =~ [^s]es$ ]] || \
133+ [[ "$first_word" =~ [^s]s$ ]]; then
134+ echo "PR title must use imperative mood"
135+ exit 1
136+ fi
137+ fi
138+
139+ echo "PR title is valid"
140+
85141 tests :
86- needs : [lint, whitespace, comments, framework]
142+ needs : [lint, whitespace, comments, framework, title ]
87143 runs-on : [self-hosted-ghr-custom, size-xl-x64, profile-consensusSpecs]
88144 strategy :
89145 matrix :
@@ -100,13 +156,13 @@ jobs:
100156 - eip7928
101157 steps :
102158 - name : Checkout repository
103- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 .0.0
159+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 .0.1
104160 - name : Set up Python
105- uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0 .0
161+ uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1 .0
106162 with :
107163 python-version-file : " pyproject.toml"
108164 - name : Install uv ${{ vars.UV_VERSION }}
109- uses : astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
165+ uses : astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a # v7.1.5
110166 with :
111167 enable-cache : true
112168 version : ${{ vars.UV_VERSION }}
0 commit comments