From 6dd05e488d9bb8ba573aa151529c201ea09e31f2 Mon Sep 17 00:00:00 2001 From: Grace Do Date: Wed, 26 Jul 2023 15:20:00 -0700 Subject: [PATCH 1/2] ci(pre-commit): Ignore commit title length in gitlint config, validate in PR title instead --- .github/workflows/lint-pr.yaml | 12 ++++++++++++ .gitlint | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yaml b/.github/workflows/lint-pr.yaml index ad6df65f2..5ca99fc54 100644 --- a/.github/workflows/lint-pr.yaml +++ b/.github/workflows/lint-pr.yaml @@ -6,6 +6,13 @@ on: - opened - edited - synchronize + - reopened + pull_request: + types: + - opened + - edited + - synchronize + - reopened jobs: main: @@ -15,3 +22,8 @@ jobs: - uses: amannn/action-semantic-pull-request@v4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: deepakputhraya/action-pr-title@master + with: + max_length: 72 # Max length of PR title + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitlint b/.gitlint index 15251e34a..ff4f968d1 100644 --- a/.gitlint +++ b/.gitlint @@ -1,3 +1,3 @@ [general] contrib=contrib-title-conventional-commits -ignore=body-is-missing +ignore=body-is-missing,title-max-length From 162ee6cc5e2c879f239b07970aa1049895e76909 Mon Sep 17 00:00:00 2001 From: Grace Do Date: Thu, 27 Jul 2023 10:54:03 -0700 Subject: [PATCH 2/2] fix(gha): Remove invalid pull_request_target action for pr linter --- .github/workflows/lint-pr.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/lint-pr.yaml b/.github/workflows/lint-pr.yaml index 5ca99fc54..59a8cd73a 100644 --- a/.github/workflows/lint-pr.yaml +++ b/.github/workflows/lint-pr.yaml @@ -1,12 +1,6 @@ name: "Lint PR" on: - pull_request_target: - types: - - opened - - edited - - synchronize - - reopened pull_request: types: - opened