diff --git a/.github/workflows/pr_conventional-title.yaml b/.github/workflows/pr_conventional-title.yaml new file mode 100644 index 00000000..08946fc0 --- /dev/null +++ b/.github/workflows/pr_conventional-title.yaml @@ -0,0 +1,28 @@ +--- +name: Conventional PR Title + +on: + pull_request: + paths: + - ".github/workflows/pr_conventional-title.yaml" + - "rust/cert-tools" + +jobs: + check: + name: Ensure PR title is conventional + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + submodules: recursive + fetch-depth: 0 + - shell: bash + env: + PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }} + run: | + echo "$PULL_REQUEST_TITLE" > pull_request_title + - uses: crate-ci/committed@dc6f20ddd899fe6d6f0402807884c0a4b3176b53 # v1.1.10 + with: + args: --commit-file pull_request_title --config rust/cert-tools/committed.toml -vv --no-merge-commit + commits: "" diff --git a/rust/cert-tools/committed.toml b/rust/cert-tools/committed.toml new file mode 100644 index 00000000..32917fa6 --- /dev/null +++ b/rust/cert-tools/committed.toml @@ -0,0 +1,2 @@ +style = "conventional" +allowed_scopes = ["cert-tools"]