Skip to content

Commit

Permalink
Add pr title checker ci job
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinw66 committed Sep 13, 2024
1 parent 89ceffb commit 598cfee
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: CI
on: [push, pull_request]

jobs:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Pull Request"
on: [push, pull_request]

jobs:
check-pr-title:
name: "Check PR Title"
runs-on: ubuntu-latest
steps:
- name: Check PR title starts with "BIGTOP-"
uses: actions/github-script@v6
with:
script: |
const prTitle = github.context.payload.pull_request.title;
if (!prTitle.startsWith("BIGTOP-")) {
core.setFailed(`PR title does not start with "BIGTOP-": ${prTitle}`);
}

0 comments on commit 598cfee

Please sign in to comment.