From 75893e6015bd3213a9c29835106ed9c452a2a42e Mon Sep 17 00:00:00 2001 From: "Shinebayar G." <3091558+shinebayar-g@users.noreply.github.com> Date: Mon, 16 Dec 2024 18:36:14 -0800 Subject: [PATCH] ci: fix workflow permission, only run if PR is open (#24) Release-As: 0.1.1 --- .github/workflows/pull-request.yaml | 7 +++++-- biome.json | 2 +- release-please-config.json | 5 +++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 8ef4690..18aa9fa 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -4,17 +4,19 @@ on: pull_request_target: types: - opened - - edited - synchronize - reopened + - edited permissions: - pull-requests: read + contents: read + pull-requests: write jobs: validate: name: Validate PR title runs-on: ubuntu-24.04 + if: github.event.pull_request.state == 'open' steps: - uses: amannn/action-semantic-pull-request@v5 id: lint_pr_title @@ -25,6 +27,7 @@ jobs: fix feat chore + ci requireScope: false diff --git a/biome.json b/biome.json index 70d7e7d..7603d35 100644 --- a/biome.json +++ b/biome.json @@ -2,7 +2,7 @@ "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", "files": { "ignoreUnknown": false, - "ignore": ["node_modules/**/*", "dist/**/*", "packages/cli/files/**/*"], + "ignore": ["node_modules/**/*", "dist/**/*", "packages/cli/files/**/*", "package.json"], "maxSize": 100000000 }, "formatter": { diff --git a/release-please-config.json b/release-please-config.json index 253c52b..af2341d 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -17,6 +17,11 @@ "type": "chore", "hidden": false, "section": "Chores" + }, + { + "type": "ci", + "hidden": false, + "section": "Chores" } ], "packages": {