Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/success.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ export default async function success(pluginConfig, context, { Octokit }) {
logger.log("No commits found in release");
}
logger.log("Skip commenting on issues and pull requests.");
logger.warn(
`DEPRECATION: 'false' for 'successComment' is deprecated and will be removed in a future major version. Use 'successCommentCondition' instead.`,
);
if (successComment === false) {
logger.warn(
`DEPRECATION: 'false' for 'successComment' is deprecated and will be removed in a future major version. Use 'successCommentCondition' instead.`,
);
}
} else if (successCommentCondition === false) {
logger.log("Skip commenting on issues and pull requests.");
} else {
Expand Down
6 changes: 6 additions & 0 deletions test/success.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,7 @@ test("Do not add comment and labels if no commits is found for release", async (
t.true(
t.context.log.calledWith("Skip commenting on issues and pull requests."),
);
t.false(t.context.warn.called);
});

test("Do not add comment and labels to PR/issues from other repo", async (t) => {
Expand Down Expand Up @@ -3269,6 +3270,11 @@ test('Skip comment on on issues/PR if "successComment" is "false"', async (t) =>
t.true(
t.context.log.calledWith("Skip commenting on issues and pull requests."),
);
t.true(
t.context.warn.calledWith(
"DEPRECATION: 'false' for 'successComment' is deprecated and will be removed in a future major version. Use 'successCommentCondition' instead.",
),
);
t.true(fetch.done());
});

Expand Down