ci: only lint commit messages in the PR (#35035)

PR Close #35035
This commit is contained in:
Joey Perrott
2020-01-29 09:47:54 -08:00
committed by Miško Hevery
parent f83be86f9d
commit 3f7be7d608
3 changed files with 21 additions and 29 deletions

View File

@ -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;
};