This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/bigtop-manager.git
The following commit(s) were added to refs/heads/main by this push:
new 8910f29 BIGTOP-4224: Add pr title checker on workflows (#67)
8910f29 is described below
commit 8910f2930ccab83351147d382f443cb3305c07a3
Author: Zhiguo Wu <[email protected]>
AuthorDate: Fri Sep 13 15:09:13 2024 +0800
BIGTOP-4224: Add pr title checker on workflows (#67)
---
.github/actions/pr-title-checker | 1 +
.github/pr-title-checker-config.json | 14 ++++++++++++++
.github/workflows/ci.yml | 1 +
.github/workflows/pr.yml | 21 +++++++++++++++++++++
.gitmodules | 3 +++
.licenserc.yaml | 2 ++
6 files changed, 42 insertions(+)
diff --git a/.github/actions/pr-title-checker b/.github/actions/pr-title-checker
new file mode 160000
index 0000000..1d8cd48
--- /dev/null
+++ b/.github/actions/pr-title-checker
@@ -0,0 +1 @@
+Subproject commit 1d8cd483a2b73118406a187f54dca8a9415f1375
diff --git a/.github/pr-title-checker-config.json
b/.github/pr-title-checker-config.json
new file mode 100644
index 0000000..4d3d2e4
--- /dev/null
+++ b/.github/pr-title-checker-config.json
@@ -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}: .*'"
+ }
+}
\ No newline at end of file
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6822ade..01c878a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,3 +1,4 @@
+name: CI
on: [push, pull_request]
jobs:
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644
index 0000000..7f03f4d
--- /dev/null
+++ b/.github/workflows/pr.yml
@@ -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
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..66d503f
--- /dev/null
+++ b/.gitmodules
@@ -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
diff --git a/.licenserc.yaml b/.licenserc.yaml
index f436ea4..d2ad311 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -21,6 +21,8 @@ header:
copyright-owner: Apache Software Foundation
paths-ignore:
+ - '.gitmodules'
+ - '.github/actions'
- '**/.idea/'
- '**/*.iml'
- '**/target/**'