From e25b5bf94e6d097a304002e792349d5c320dcdfc Mon Sep 17 00:00:00 2001 From: "Pengfei(Andy) Zhang" Date: Tue, 15 Oct 2024 13:22:05 -0400 Subject: [PATCH 1/2] style: check pr title with commitlint. --- .github/workflows/pr-lint.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/pr-lint.yaml diff --git a/.github/workflows/pr-lint.yaml b/.github/workflows/pr-lint.yaml new file mode 100644 index 000000000..93d0048dc --- /dev/null +++ b/.github/workflows/pr-lint.yaml @@ -0,0 +1,16 @@ +on: + pull_request: + types: + - opened + - edited + - reopened + +name: PR title check +jobs: + pr-semantic-check: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6a05f4ec250f4834d84c010175b74b88dff2702b Mon Sep 17 00:00:00 2001 From: "Pengfei(Andy) Zhang" Date: Wed, 16 Oct 2024 09:14:13 -0400 Subject: [PATCH 2/2] feat: enable permissions for pr from forks. --- .github/workflows/pr-lint.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/pr-lint.yaml b/.github/workflows/pr-lint.yaml index 93d0048dc..0b8c7007b 100644 --- a/.github/workflows/pr-lint.yaml +++ b/.github/workflows/pr-lint.yaml @@ -4,6 +4,15 @@ on: - opened - edited - reopened + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + +permissions: + pull-requests: read name: PR title check jobs: