Skip to content

Commit f15db6b

Browse files
committed
ci: condense messages, clarify "changelog" message
Problem: - Contributors get confused about when to add a changelog. - Bot adds two comments which could be combined into one comment. Solution: - Clarify the changelog note. - Combine messages into one comment.
1 parent 6605489 commit f15db6b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/notify.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
const { hasPath, dedupComment } = require('./utils')
77

88
const testFilesMessage =
9-
'This pull request modifies code in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required.'
9+
'- This pull request modifies code in `src/*` but no tests were added/updated.\n - Confirm whether tests should be added or ensure the PR description explains why tests are not required.\n'
1010

11-
const changelogMessage = `This pull request implements a feature or fix, so it must include a changelog entry. See [CONTRIBUTING.md#changelog](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#changelog) for instructions.`
11+
const changelogMessage =
12+
'- This pull request implements a `feat` or `fix`, so it must include a changelog entry (unless the fix is for an *unreleased* feature). Review the [changelog guidelines](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#changelog).\n - Note: beta or "experiment" features that have active users *should* announce fixes in the changelog.\n - Do not use `feat` or `fix` unless this is a feature or fix. Use another type listed in the [guidelines](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#pull-request-title). For example, telemetry-only changes should use the `telemetry` type.\n'
1213

1314
/**
1415
* Remind partner teams that tests are required. We don't need to remind them if:
@@ -44,12 +45,16 @@ module.exports = async ({ github, context }) => {
4445
issue_number: pullRequestId,
4546
})
4647

48+
let msg = ''
4749
if (shouldAddTestFileMessage) {
48-
await dedupComment({ github, comments, owner, repo, pullRequestId, message: testFilesMessage })
50+
msg += testFilesMessage
4951
}
50-
5152
if (shouldAddChangelogMessage) {
52-
await dedupComment({ github, comments, owner, repo, pullRequestId, message: changelogMessage })
53+
msg += changelogMessage
54+
}
55+
56+
if (shouldAddTestFileMessage || shouldAddChangelogMessage) {
57+
await dedupComment({ github, comments, owner, repo, pullRequestId, message: msg })
5358
}
5459
}
5560

0 commit comments

Comments
 (0)