Skip to content

Commit

Permalink
feat(semantic-release/github): only post PR comment on release/alpha/…
Browse files Browse the repository at this point in the history
…hotfix

Cuts down GH notifications for epic branches.
  • Loading branch information
adekbadek committed Jun 6, 2024
1 parent f65b57c commit f903611
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ if (shouldPublishOnNPM) {
}

const getConfig = ({ gitBranchName }) => {
const branchType = gitBranchName.split("/")[0];

const config = {
dryRun: otherArgs.dryRun,
ci: otherArgs.ci,
Expand Down Expand Up @@ -71,6 +73,8 @@ const getConfig = ({ gitBranchName }) => {
label: `${process.env.CIRCLE_PROJECT_REPONAME}.zip`,
},
],
// Only post GH PR comments for alpha, hotfix/*, and release branches.
successComment: ["alpha", "hotfix", "release"].includes(branchType),
},
],
],
Expand All @@ -87,7 +91,6 @@ const getConfig = ({ gitBranchName }) => {
]);

// Unless on a hotfix or epic branch, add a commit that updates the files.
const branchType = gitBranchName.split("/")[0];
if (["hotfix", "epic"].indexOf(branchType) === -1) {
let assets = filesList;
// These assets should be added to source control after a release.
Expand Down

0 comments on commit f903611

Please sign in to comment.