Skip to content

Commit ab937e4

Browse files
authored
ci: editing PR description re-triggers all GitHub Actions #6274
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, which triggers whenever the PR is edited in any way (very noisy). 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 ab937e4

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@
88

99
- Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time.
1010
- Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
11-
12-
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
11+
- License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

.github/workflows/lintcommit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Invalid pull request title: \`${title}\`
130130
* scope: lowercase, <30 chars
131131
* subject: must be <100 chars
132132
* documentation: https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#pull-request-title
133+
* Hint: *close and re-open the PR* to re-trigger CI (after fixing the PR title).
133134
`
134135
: `Pull request title matches the [expected format](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#pull-request-title).`
135136

.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+
# Note: 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

.github/workflows/notification.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ name: Notifications
66
on:
77
# `pull_request_target` (as opposed to `pull_request`) gives permissions to comment on PRs.
88
pull_request_target:
9-
branches: [master, feature/*, staging]
10-
# Default = opened + synchronize + reopened.
11-
# We also want "edited" so that changelog notifications runs when PR title is updated.
9+
# By default, CI will trigger on opened/synchronize/reopened event types.
1210
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
13-
types:
14-
- edited
15-
- opened
16-
- reopened
17-
- synchronize
11+
# Note: To re-run `lint-commits` after fixing the PR title, close-and-reopen the PR.
12+
branches: [master, feature/*, staging]
1813

1914
# Cancel old jobs when a pull request is updated.
2015
concurrency:

0 commit comments

Comments
 (0)