Skip to content

Commit 55834c0

Browse files
committed
ci: GHA jobs re-trigger too frequently
Problem: Since 6dcbfc7, the `lint-commits` job runs whenever the PR *description* is edited, which then re-runs all the other GHA jobs. This is because it listens to the `edited` event. Solution: There is no way to avoid rerunning all the CI jobs if they are dependent on `lint-commits`. Instead, revert 6dcbfc7 and document that re-opening the PR will force CI to re-run, if needed, after fixing a PR title.
1 parent 8708c52 commit 55834c0

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/node.js.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@ on:
77
push:
88
branches: [master, staging]
99
pull_request:
10-
branches: [master, feature/*, staging]
11-
# Default = opened + synchronize + reopened.
12-
# We also want "edited" so that lint-commits runs when PR title is updated.
10+
# By default, CI will trigger on opened/synchronize/reopened event types.
1311
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
14-
types:
15-
- edited
16-
- opened
17-
- reopened
18-
- synchronize
12+
# To re-run lint-commits after fixing the PR title, close-and-reopen the PR.
13+
branches: [master, feature/*, staging]
1914

2015
# Cancel old jobs when a pull request is updated.
2116
concurrency:
@@ -24,6 +19,7 @@ concurrency:
2419

2520
jobs:
2621
lint-commits:
22+
# Note: To re-run `lint-commits` after fixing the PR title, close-and-reopen the PR.
2723
runs-on: ubuntu-latest
2824
steps:
2925
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)