-
Notifications
You must be signed in to change notification settings - Fork 326
32 lines (28 loc) · 1.1 KB
/
ci-pr-title-validation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: PR Title Validation
on:
pull_request:
types: [opened, synchronize, reopened, edited]
# Copied & adapted (job name, version label) from
# https://github.com/ytanikin/PRConventionalCommits?tab=readme-ov-file#usage-with-labeling-where-label-is-just-a-task-type
jobs:
validate-pr-title:
name: PR Conventional Commit Validation
runs-on: ubuntu-latest
steps:
- name: Validate PR Title
uses: ytanikin/PRConventionalCommits@8d258b54939f6769fcd935a52b96d6b0383a00c5 # v1.2.0
with:
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'
pr-title-check:
name: Check PR Title for Deprecated Flags
runs-on: ubuntu-latest
steps:
- name: Check PR Title
id: check-pr-title
env:
CI_MERGE_REQUEST_TITLE: ${{ github.event.pull_request.title }}
run: |
if [[ $CI_MERGE_REQUEST_TITLE == *"[S3_UPLOAD]"* ]]; then
echo "Error: The [S3_UPLOAD] flag has been deprecated. Please use [RUN_ALL_BAZEL_TARGETS] instead. It will automatically upload to S3."
exit 1
fi