Skip to content

Commit 2b38722

Browse files
committed
a
1 parent 8d38285 commit 2b38722

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/incrementVersionAndCreatePR.cjs

+13-8
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,19 @@ module.exports = async ({ github, context, versionType }) => {
3434
}
3535

3636
async function createPull(title, source, target) {
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-
});
37+
try {
38+
await github.pulls.create({
39+
title,
40+
body: `${title} PR.`,
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
head: source,
44+
base: target,
45+
});
46+
} catch (error) {
47+
console.log("Error in creating PR", error);
48+
throw new Error("Error in creating PR", error);
49+
}
4550
}
4651

4752
try {

0 commit comments

Comments
 (0)