From f903611e7c0328dacb5760b261f33febd5c9ebe6 Mon Sep 17 00:00:00 2001 From: Adam Cassis Date: Thu, 6 Jun 2024 09:07:49 +0200 Subject: [PATCH] feat(semantic-release/github): only post PR comment on release/alpha/hotfix Cuts down GH notifications for epic branches. --- scripts/release.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/release.js b/scripts/release.js index d9e5489..caf519b 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -21,6 +21,8 @@ if (shouldPublishOnNPM) { } const getConfig = ({ gitBranchName }) => { + const branchType = gitBranchName.split("/")[0]; + const config = { dryRun: otherArgs.dryRun, ci: otherArgs.ci, @@ -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), }, ], ], @@ -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.