|
|
@ -5883,9 +5883,11 @@ class GitCommandManager {
|
|
|
|
yield this.execGit(['lfs', 'install', '--local']);
|
|
|
|
yield this.execGit(['lfs', 'install', '--local']);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log1() {
|
|
|
|
log1(format) {
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
const output = yield this.execGit(['log', '-1']);
|
|
|
|
var args = format ? ['log', '-1', format] : ['log', '-1'];
|
|
|
|
|
|
|
|
var silent = format ? false : true;
|
|
|
|
|
|
|
|
const output = yield this.execGit(args, false, silent);
|
|
|
|
return output.stdout;
|
|
|
|
return output.stdout;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -6007,7 +6009,7 @@ class GitCommandManager {
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
execGit(args, allowAllExitCodes = false) {
|
|
|
|
execGit(args, allowAllExitCodes = false, silent = false) {
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
fshelper.directoryExistsSync(this.workingDirectory, true);
|
|
|
|
fshelper.directoryExistsSync(this.workingDirectory, true);
|
|
|
|
const result = new GitOutput();
|
|
|
|
const result = new GitOutput();
|
|
|
@ -6022,6 +6024,7 @@ class GitCommandManager {
|
|
|
|
const options = {
|
|
|
|
const options = {
|
|
|
|
cwd: this.workingDirectory,
|
|
|
|
cwd: this.workingDirectory,
|
|
|
|
env,
|
|
|
|
env,
|
|
|
|
|
|
|
|
silent,
|
|
|
|
ignoreReturnCode: allowAllExitCodes,
|
|
|
|
ignoreReturnCode: allowAllExitCodes,
|
|
|
|
listeners: {
|
|
|
|
listeners: {
|
|
|
|
stdout: (data) => {
|
|
|
|
stdout: (data) => {
|
|
|
@ -6267,8 +6270,10 @@ function getSource(settings) {
|
|
|
|
yield authHelper.removeGlobalAuth();
|
|
|
|
yield authHelper.removeGlobalAuth();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Dump some info about the checked out commit
|
|
|
|
// Get commit information
|
|
|
|
const commitInfo = yield git.log1();
|
|
|
|
const commitInfo = yield git.log1();
|
|
|
|
|
|
|
|
// Log commit sha
|
|
|
|
|
|
|
|
yield git.log1("--format='%H'");
|
|
|
|
// Check for incorrect pull request merge commit
|
|
|
|
// Check for incorrect pull request merge commit
|
|
|
|
yield refHelper.checkCommitInfo(settings.authToken, commitInfo, settings.repositoryOwner, settings.repositoryName, settings.ref, settings.commit);
|
|
|
|
yield refHelper.checkCommitInfo(settings.authToken, commitInfo, settings.repositoryOwner, settings.repositoryName, settings.ref, settings.commit);
|
|
|
|
}
|
|
|
|
}
|
|
|
|