|
6 | 6 | const { hasPath, dedupComment } = require('./utils')
|
7 | 7 |
|
8 | 8 | 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' |
10 | 10 |
|
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 - If this is not a feature or fix, use an appropriate type from the [title 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' |
12 | 13 |
|
13 | 14 | /**
|
14 | 15 | * Remind partner teams that tests are required. We don't need to remind them if:
|
@@ -44,12 +45,16 @@ module.exports = async ({ github, context }) => {
|
44 | 45 | issue_number: pullRequestId,
|
45 | 46 | })
|
46 | 47 |
|
| 48 | + let msg = '' |
47 | 49 | if (shouldAddTestFileMessage) {
|
48 |
| - await dedupComment({ github, comments, owner, repo, pullRequestId, message: testFilesMessage }) |
| 50 | + msg += testFilesMessage |
49 | 51 | }
|
50 |
| - |
51 | 52 | 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 }) |
53 | 58 | }
|
54 | 59 | }
|
55 | 60 |
|
|
0 commit comments