From 7aede3390d073bf93d7ee143e3d6c6fda97f08a5 Mon Sep 17 00:00:00 2001 From: Robert Pirtle Date: Wed, 14 Aug 2024 10:22:46 -0700 Subject: [PATCH] ci: add semantic pull request title linting (#2006) enforces following conventional commit standard in all PR titles --- .github/workflows/ci-pr-lint.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/ci-pr-lint.yml diff --git a/.github/workflows/ci-pr-lint.yml b/.github/workflows/ci-pr-lint.yml new file mode 100644 index 0000000000..3b6685c9f2 --- /dev/null +++ b/.github/workflows/ci-pr-lint.yml @@ -0,0 +1,27 @@ +# this workflow is responsible for ensuring quality titles are given to all PRs +# for PR checks to pass, the title must follow the Conventional Commits standard +# https://www.conventionalcommits.org/en/v1.0.0/ +# this workflow was adapted from a similar workflow in https://github.com/cosmos/cosmos-sdk +name: "Lint PR Title" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + contents: read + +jobs: + main: + permissions: + pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs + statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR + runs-on: ubuntu-latest + steps: + # https://github.com/marketplace/actions/semantic-pull-request + - uses: amannn/action-semantic-pull-request@v5.5.3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}