diff --git a/.github/workflows/pr-title-lint.yml b/.github/workflows/pr-title-lint.yml index a44b020..c3992ef 100644 --- a/.github/workflows/pr-title-lint.yml +++ b/.github/workflows/pr-title-lint.yml @@ -1,10 +1,20 @@ -name: "pr-title-lint" +name: PR Linter on: pull_request: + types: [opened, edited, reopened, synchronize] jobs: - test: + lint: runs-on: ubuntu-latest + permissions: + pull-requests: read steps: - - uses: actions/checkout@v1 - - uses: JulienKode/pull-request-name-linter-action@v0.5.0 \ No newline at end of file + - uses: actions/checkout@v4 + + - name: Debug PR Title + run: echo "The PR title is: ${{ github.event.pull_request.title }}" + + - name: Install Dependencies + run: npm install @commitlint/config-conventional + + - uses: JulienKode/pull-request-name-linter-action@v20.1.0 diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..34961fe --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,17 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + extends: ['@commitlint/config-conventional'], +};