From bf1322d3d93bc00f7d72c4c2ffa98bab50b2b0ae Mon Sep 17 00:00:00 2001 From: Shadaj Laddad Date: Fri, 24 May 2024 10:51:12 -0700 Subject: [PATCH] ci: validate the PR title rather than the commit message (#1169) If we switch the repository to require squash-and-merge strategy with the commit using the PR title, then this makes it a lot easier to enforce conventional commits. Co-authored-by: Mingwei Samuel --- .github/workflows/conventional_commits.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/conventional_commits.yml b/.github/workflows/conventional_commits.yml index 90fa3ae37418..4bd1fe057a2e 100644 --- a/.github/workflows/conventional_commits.yml +++ b/.github/workflows/conventional_commits.yml @@ -1,13 +1,20 @@ name: Conventional Commits on: - pull_request: - branches: [ main ] + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + pull-requests: read jobs: - build: + main: name: Conventional Commits runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: webiny/action-conventional-commits@v1.1.0 + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}