
committed by
Miško Hevery

parent
f83be86f9d
commit
3f7be7d608
@ -6,6 +6,9 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// This script uses `console` to print messages to the user.
|
||||
// tslint:disable:no-console
|
||||
|
||||
const https = require('https');
|
||||
const util = require('util');
|
||||
const child_process = require('child_process');
|
||||
@ -68,18 +71,19 @@ module.exports = async function getRefsAndShasForTarget(prNumber) {
|
||||
const {stdout: commonAncestorSha} =
|
||||
await exec(`git merge-base origin/${result.base.ref} ${latestShaOfPrBranch}`);
|
||||
|
||||
return {
|
||||
const output = {
|
||||
base: {
|
||||
ref: result.base.ref.trim(),
|
||||
sha: result.base.sha.trim(),
|
||||
ref: result.base.ref,
|
||||
sha: result.base.sha,
|
||||
},
|
||||
head: {
|
||||
ref: result.head.ref.trim(),
|
||||
sha: result.head.sha.trim()
|
||||
ref: result.head.ref,
|
||||
sha: result.head.sha,
|
||||
},
|
||||
commonAncestorSha: commonAncestorSha.trim(),
|
||||
latestShaOfTargetBranch: latestShaOfTargetBranch.trim(),
|
||||
latestShaOfPrBranch: latestShaOfPrBranch.trim(),
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
Reference in New Issue
Block a user