Skip to content

Commit fe70189

Browse files
committed
Error
1 parent afd1f2d commit fe70189

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
@@ -33,14 +33,19 @@ module.exports = async ({ github, context, versionType }) => {
3333
}
3434

3535
async function createPull(title, source, target) {
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-
});
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+
}
4449
}
4550

4651
try {

0 commit comments

Comments
 (0)