From eff3a2b47349c7ed137a1df90a6739d822b54e0c Mon Sep 17 00:00:00 2001 From: Akinori Ito Date: Sat, 15 Feb 2025 14:25:37 +0900 Subject: [PATCH 1/2] fix: use secrets.GITHUB_TOKEN instead of app token --- .github/workflows/release-please.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 5ffb10a..a85f5c6 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -13,15 +13,9 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ secrets.CREATE_APP_TOKEN_APP_ID }} - private-key: ${{ secrets.CREATE_APP_TOKEN_PRIVATE_KEY }} - name: release-please uses: googleapis/release-please-action@v4 with: - token: ${{ steps.app-token.outputs.token }} config-file: release-please-config.json # optional. customize path to .release-please-manifest.json manifest-file: .release-please-manifest.json From 6564bba4411a5ab1f82867ba9921ebc056b182a9 Mon Sep 17 00:00:00 2001 From: Akinori Ito Date: Sat, 15 Feb 2025 14:26:23 +0900 Subject: [PATCH 2/2] fix: change action to satisfy minimum requirement of workflow, which is just checking pr title --- .github/workflows/conventional-pr.yml | 24 ------------------------ .github/workflows/lint-pr.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 24 deletions(-) delete mode 100644 .github/workflows/conventional-pr.yml create mode 100644 .github/workflows/lint-pr.yml diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml deleted file mode 100644 index c5fe85b..0000000 --- a/.github/workflows/conventional-pr.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Check PR name and body -on: - pull_request: - -permissions: - contents: read - pull-requests: write - -jobs: - conventional-commit: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v4 - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app_id: ${{ secrets.CREATE_APP_TOKEN_APP_ID }} - private_key: ${{ secrets.CREATE_APP_TOKEN_PRIVATE_KEY }} - - name: run conventional commit - uses: hmarr/auto-approve-action@v4 - with: - github-token: ${{ steps.app-token.outputs.token }} - diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml new file mode 100644 index 0000000..2728c88 --- /dev/null +++ b/.github/workflows/lint-pr.yml @@ -0,0 +1,21 @@ +name: Lint PR + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + +permissions: + pull-requests: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}