Skip to content

Commit 83037d0

Browse files
committed
chore(commenting): log warning if successComment or failComment is used for disabling these
1 parent b998ee2 commit 83037d0

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ If you need to bypass the proxy for some hosts, configure the `NO_PROXY` environ
8888
| `gitlabApiPathPrefix` | The GitLab API prefix. | `GL_PREFIX` or `GITLAB_PREFIX` environment variable or CI provided environment variables if running on [GitLab CI/CD](https://docs.gitlab.com/ee/ci) or `/api/v4`. |
8989
| `assets` | An array of files to upload to the release. See [assets](#assets). | - |
9090
| `milestones` | An array of milestone titles to associate to the release. See [GitLab Release API](https://docs.gitlab.com/ee/api/releases/#create-a-release). | - |
91-
| `successComment` | The comment to add to each Issue and Merge Request resolved by the release. Set to false to disable commenting. See [successComment](#successComment). | :tada: This issue has been resolved in version ${nextRelease.version} :tada:\n\nThe release is available on [GitLab release](gitlab_release_url) |
92-
| `failComment` | The content of the issue created when a release fails. Set to `false` to disable opening an issue when a release fails. See [failComment](#failcomment). | Friendly message with links to **semantic-release** documentation and support, with the list of errors that caused the release to fail. |
93-
| `failTitle` | The title of the issue created when a release fails. Set to `false` to disable opening an issue when a release fails. | `The automated release is failing 🚨` |
91+
| `successComment` | The comment to add to each Issue and Merge Request resolved by the release. See [successComment](#successComment). | :tada: This issue has been resolved in version ${nextRelease.version} :tada:\n\nThe release is available on [GitLab release](gitlab_release_url) |
92+
| `failComment` | The content of the issue created when a release fails. See [failComment](#failcomment). | Friendly message with links to **semantic-release** documentation and support, with the list of errors that caused the release to fail. |
93+
| `failTitle` | The title of the issue created when a release fails. | `The automated release is failing 🚨` |
9494
| `labels` | The [labels](https://docs.gitlab.com/ee/user/project/labels.html#labels) to add to the issue created when a release fails. Set to `false` to not add any label. Labels should be comma-separated as described in the [official docs](https://docs.gitlab.com/ee/api/issues.html#new-issue), e.g. `"semantic-release,bot"`. | `semantic-release` |
9595
| `assignee` | The [assignee](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#assignee) to add to the issue created when a release fails. | - |
9696

lib/fail.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export default async (pluginConfig, context) => {
2424

2525
if (failComment === false || failTitle === false) {
2626
logger.log("Skip issue creation.");
27+
logger.error(`Disabling failure reporting should be done using 'failCommentCondition'.
28+
Using 'false' for 'failComment' or 'failTitle' is deprecated and will be removed in a future major version!`);
2729
} else {
2830
const encodedFailTitle = encodeURIComponent(failTitle);
2931
const description = failComment ? template(failComment)({ branch, errors }) : getFailComment(branch, errors);

lib/success.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export default async (pluginConfig, context) => {
2222

2323
if (successComment === false) {
2424
logger.log("Skip commenting on issues and pull requests.");
25+
logger.error(`Disabling commenting on issues and pull requests should be done using 'successCommentCondition'.
26+
Using 'false' for 'successComment' is deprecated and will be removed in a future major version!`);
2527
} else {
2628
const releaseInfos = releases.filter((release) => Boolean(release.name));
2729
try {

0 commit comments

Comments
 (0)