Skip to content

Commit a899b33

Browse files
committed
Use an immediately invoked function expression instead of a named function
1 parent 6e6b9f4 commit a899b33

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

create-pull-request.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const exec = util.promisify(require("child_process").exec);
44
const gitRemoteOriginUrl = require("git-remote-origin-url");
55
const open = require("open");
66

7-
async function generateLink() {
7+
(async () => {
88
try {
99
const { stdout, stderr } = await exec("git rev-parse --abbrev-ref HEAD");
1010
if (stderr) {
@@ -19,6 +19,4 @@ async function generateLink() {
1919
} catch (error) {
2020
throw error;
2121
}
22-
}
23-
24-
generateLink();
22+
})();

0 commit comments

Comments
 (0)