mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
[CI] test committed
This commit is contained in:
parent
20dac2ed48
commit
4c1c87cddd
2 changed files with 10 additions and 3 deletions
12
dist/index.js
vendored
12
dist/index.js
vendored
|
@ -39,6 +39,7 @@ exports.createOrUpdateBranch = exports.tryFetch = exports.getWorkingBaseAndType
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
const uuid_1 = __nccwpck_require__(5840);
|
const uuid_1 = __nccwpck_require__(5840);
|
||||||
const CHERRYPICK_EMPTY = 'The previous cherry-pick is now empty, possibly due to conflict resolution.';
|
const CHERRYPICK_EMPTY = 'The previous cherry-pick is now empty, possibly due to conflict resolution.';
|
||||||
|
const NOTHING_TO_COMMIT = 'nothing to commit, working tree clean';
|
||||||
var WorkingBaseType;
|
var WorkingBaseType;
|
||||||
(function (WorkingBaseType) {
|
(function (WorkingBaseType) {
|
||||||
WorkingBaseType["Branch"] = "branch";
|
WorkingBaseType["Branch"] = "branch";
|
||||||
|
@ -138,7 +139,12 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName
|
||||||
if (signoff) {
|
if (signoff) {
|
||||||
popts.push('--signoff');
|
popts.push('--signoff');
|
||||||
}
|
}
|
||||||
yield git.commit(popts);
|
const commitResult = yield git.commit(popts, true);
|
||||||
|
// 'nothing to commit' can occur when core.autocrlf is set to true
|
||||||
|
if (commitResult.exitCode != 0 &&
|
||||||
|
!commitResult.stdout.includes(NOTHING_TO_COMMIT)) {
|
||||||
|
throw new Error(`Unexpected error: ${commitResult.stderr}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Remove uncommitted tracked and untracked changes
|
// Remove uncommitted tracked and untracked changes
|
||||||
yield git.exec(['reset', '--hard']);
|
yield git.exec(['reset', '--hard']);
|
||||||
|
@ -674,7 +680,7 @@ class GitCommandManager {
|
||||||
return yield this.exec(args, allowAllExitCodes);
|
return yield this.exec(args, allowAllExitCodes);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
commit(options) {
|
commit(options, allowAllExitCodes = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const args = ['commit'];
|
const args = ['commit'];
|
||||||
if (this.identityGitOptions) {
|
if (this.identityGitOptions) {
|
||||||
|
@ -683,7 +689,7 @@ class GitCommandManager {
|
||||||
if (options) {
|
if (options) {
|
||||||
args.push(...options);
|
args.push(...options);
|
||||||
}
|
}
|
||||||
yield this.exec(args);
|
return yield this.exec(args, allowAllExitCodes);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
config(configKey, configValue, globalConfig) {
|
config(configKey, configValue, globalConfig) {
|
||||||
|
|
1
report.txt
Normal file
1
report.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1660722273
|
Loading…
Add table
Add a link
Reference in a new issue