This commit is contained in:
di-sukharev
2023-05-20 21:41:09 +08:00
parent cec6890525
commit 03210f16d0
2 changed files with 13 additions and 11 deletions

View File

@@ -27309,10 +27309,6 @@ async function run(retries = 3) {
`${process.env.GITHUB_ACTOR}@users.noreply.github.com`
]);
await import_exec.default.exec("git", ["config", "user.name", process.env.GITHUB_ACTOR]);
await import_exec.default.exec("git", ["fetch", "--all"]);
await import_exec.default.exec("git", ["pull"]);
await import_exec.default.exec("git", ["status"]);
await import_exec.default.exec("git", ["log", "--oneline"]);
try {
if (import_github.default.context.eventName === "pull_request") {
const baseBranch = import_github.default.context.payload.pull_request?.base.ref;
@@ -27335,6 +27331,11 @@ async function run(retries = 3) {
pull_number: payload.pull_request.number
});
const commits = commitsResponse.data;
await import_exec.default.exec("git", ["checkout", sourceBranch]);
await import_exec.default.exec("git", ["fetch", "--all"]);
await import_exec.default.exec("git", ["pull"]);
await import_exec.default.exec("git", ["status"]);
await import_exec.default.exec("git", ["log", "--oneline"]);
await improveCommitMessagesWithRebase({
commits,
base: baseBranch,

View File

@@ -190,13 +190,6 @@ async function run(retries = 3) {
]);
await exec.exec('git', ['config', 'user.name', process.env.GITHUB_ACTOR!]);
await exec.exec('git', ['fetch', '--all']);
await exec.exec('git', ['pull']);
await exec.exec('git', ['status']);
await exec.exec('git', ['log', '--oneline']);
// await exec.exec('git', ['commit', '--amend', '-m', 'NEW_DAT_MSG']);
// await exec.exec('git', ['push', '--force']);
@@ -227,6 +220,14 @@ async function run(retries = 3) {
const commits = commitsResponse.data;
// --- TEST ---
await exec.exec('git', ['checkout', sourceBranch]);
await exec.exec('git', ['fetch', '--all']);
await exec.exec('git', ['pull']);
await exec.exec('git', ['status']);
await exec.exec('git', ['log', '--oneline']);
// --- TEST ---
await improveCommitMessagesWithRebase({
commits,
base: baseBranch,