Skip to content

Commit

Permalink
BIGTOP-4224: Add pr title checker on workflows (apache#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinw66 authored Sep 13, 2024
1 parent 89ceffb commit 8910f29
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/pr-title-checker
Submodule pr-title-checker added at 1d8cd4
14 changes: 14 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"LABEL": {
"name": "title needs formatting",
"color": "EEEEEE"
},
"CHECKS": {
"regexp": "^BIGTOP-\\d{1,9}: .*"
},
"MESSAGES": {
"success": "PR title is valid",
"failure": "PR title is invalid",
"notice": "PR Title needs to pass regex '^BIGTOP-\\d{1,9}: .*'"
}
}
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
21 changes: 21 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Pull Request"
on:
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
check-pr-title:
name: "Check PR Title"
runs-on: ubuntu-latest
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
- name: "Check PR Title"
uses: ./.github/actions/pr-title-checker
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: .github/pr-title-checker-config.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule ".github/actions/pr-title-checker"]
path = .github/actions/pr-title-checker
url = https://github.com/thehanimo/pr-title-checker.git
2 changes: 2 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ header:
copyright-owner: Apache Software Foundation

paths-ignore:
- '.gitmodules'
- '.github/actions'
- '**/.idea/'
- '**/*.iml'
- '**/target/**'
Expand Down

0 comments on commit 8910f29

Please sign in to comment.