summaryrefslogtreecommitdiff
path: root/tools/doc/apilinks.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/doc/apilinks.js')
-rw-r--r--tools/doc/apilinks.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/doc/apilinks.js b/tools/doc/apilinks.js
index 514d22e8dc..461805dac3 100644
--- a/tools/doc/apilinks.js
+++ b/tools/doc/apilinks.js
@@ -36,10 +36,10 @@ function execSync(command) {
}
// Determine origin repo and tag (or hash) of the most recent commit.
-const local_branch = execSync('git name-rev --name-only HEAD');
-const tracking_remote = execSync(`git config branch.${local_branch}.remote`);
-const remote_url = execSync(`git config remote.${tracking_remote}.url`);
-const repo = (remote_url.match(/(\w+\/\w+)\.git\r?\n?$/) ||
+const localBranch = execSync('git name-rev --name-only HEAD');
+const trackingRemote = execSync(`git config branch.${localBranch}.remote`);
+const remoteUrl = execSync(`git config remote.${trackingRemote}.url`);
+const repo = (remoteUrl.match(/(\w+\/\w+)\.git\r?\n?$/) ||
['', 'nodejs/node'])[1];
const hash = execSync('git log -1 --pretty=%H') || 'master';