Skip to content
Merged
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
9 changes: 7 additions & 2 deletions src/post-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ exports.executePostRelease = async function executePostRelease() {
...Config.repo,
tag_name: version,
target_commitish: Config.prodBranch,
name: releaseNotes.name,
body: releaseNotes.body,
});

Expand All @@ -116,8 +117,12 @@ exports.executePostRelease = async function executePostRelease() {

const slackStr = core.getInput("slack");
if (slackStr) {
const slackOpts = JSON.parse("slack");

let slackOpts;
try {
slackOpts = JSON.parse(slackStr);
} catch (err) {
throw new Error(`Could not parse ${slackStr}`);
}
console.log(`Posting to slack channel #${slackOpts.channel}`);
const slackToken = process.env.SLACK_TOKEN;
if (!slackToken) throw new Error("process.env.SLACK_TOKEN is not defined");
Expand Down