Skip to content

Commit 7029fa2

Browse files
committed
d
1 parent fe70189 commit 7029fa2

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

.github/workflows/incrementVersionAndCreatePR.cjs

+9-14
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,14 @@ module.exports = async ({ github, context, versionType }) => {
3333
}
3434

3535
async function createPull(title, source, target) {
36-
try {
37-
await github.pulls.create({
38-
title,
39-
body: `${title} PR.`,
40-
owner: context.repo.owner,
41-
repo: context.repo.repo,
42-
head: source,
43-
base: target,
44-
});
45-
} catch (error) {
46-
console.error(error);
47-
throw new Error("Error in creating pull request", error);
48-
}
36+
await github.pulls.create({
37+
title,
38+
body: `${title} PR.`,
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
head: source,
42+
base: target,
43+
});
4944
}
5045

5146
try {
@@ -62,7 +57,7 @@ module.exports = async ({ github, context, versionType }) => {
6257
`Created pull request for version increment to v${version}(${versionType}).`
6358
);
6459
} else {
65-
throw new Error("Pull request already exists for this version increment");
60+
console.error("Pull request already exists for this version increment");
6661
}
6762
} catch (error) {
6863
throw new Error("Error in version increment and PR creation", error);

0 commit comments

Comments
 (0)