mirror of https://github.com/embarklabs/embark.git
13 lines
281 B
JavaScript
13 lines
281 B
JavaScript
/* global process require */
|
|
|
|
const {execSync} = require('child_process');
|
|
|
|
let branchName = execSync('git name-rev --name-only HEAD').toString().trim();
|
|
let prId = '';
|
|
|
|
if (branchName.startsWith('remotes/pull')) {
|
|
prId = branchName.split('/')[2];
|
|
}
|
|
|
|
process.stdout.write(prId);
|