Skip to content

Commit 2830e3b

Browse files
committed
a
1 parent b828194 commit 2830e3b

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

.github/workflows/incrementVersionAndCreatePR.cjs

+13-19
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,18 @@ module.exports = async ({ github, context, versionType }) => {
4646
});
4747
}
4848

49-
try {
50-
await configureGit();
51-
const { featureBranch, version } = await incrementVersion();
52-
const hasOpenPr = await getPull(featureBranch, "master");
53-
54-
if (!hasOpenPr) {
55-
await pushChangesAndTags(featureBranch);
56-
const title = `Version Increment to v${version}(${versionType})`;
57-
await createPull(title, featureBranch, "master");
58-
console.log(
59-
`Created pull request for version increment to v${version}(${versionType}).`
60-
);
61-
} else {
62-
console.error("Pull request already exists for this version increment");
63-
}
64-
} catch (error) {
65-
console.error("Error encountered:", error);
66-
throw error;
67-
// Decide whether to re-throw the error or handle it differently here
49+
await configureGit();
50+
const { featureBranch, version } = await incrementVersion();
51+
const hasOpenPr = await getPull(featureBranch, "master");
52+
53+
if (!hasOpenPr) {
54+
await pushChangesAndTags(featureBranch);
55+
const title = `Version Increment to v${version}(${versionType})`;
56+
await createPull(title, featureBranch, "master");
57+
console.log(
58+
`Created pull request for version increment to v${version}(${versionType}).`
59+
);
60+
} else {
61+
console.error("Pull request already exists for this version increment");
6862
}
6963
};

0 commit comments

Comments
 (0)