Skip to content

Commit 0aa21ac

Browse files
committed
a
1 parent 2b38722 commit 0aa21ac

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/incrementVersionAndCreatePR.cjs

+11-13
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ module.exports = async ({ github, context, versionType }) => {
77
async function configureGit() {
88
await execAsync('git config user.name "github-actions"');
99
await execAsync('git config user.email "github-actions@github.com"');
10+
11+
console.log("Configured git user");
1012
}
1113

1214
async function incrementVersion() {
15+
console.log(`Incrementing version with ${versionType}`);
1316
await execAsync(`npm version ${versionType}`);
1417
const packageJson = require("../../package.json");
1518
const version = packageJson.version;
@@ -34,19 +37,14 @@ module.exports = async ({ github, context, versionType }) => {
3437
}
3538

3639
async function createPull(title, source, target) {
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-
}
40+
await github.pulls.create({
41+
title,
42+
body: `${title} PR.`,
43+
owner: context.repo.owner,
44+
repo: context.repo.repo,
45+
head: source,
46+
base: target,
47+
});
5048
}
5149

5250
try {

0 commit comments

Comments
 (0)