Skip to content

Commit

Permalink
fix(ci): wrong generated commit (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Mar 17, 2022
1 parent 3faaf4f commit 7feda55
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions scripts/ci/codegen/upsertGenerationComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ ${commentText[trigger].body}`;
}

const baseBranch = await run('git branch --show-current');
const commit = await run(`git show ${baseBranch} -s --format=%H`);
const generatedCommit = await run('git show -s --format=%H');
const branch = `generated/${baseBranch}`;
const baseCommit = await run(`git show ${baseBranch} -s --format=%H`);

const generatedBranch = `generated/${baseBranch}`;
const generatedCommit = await run(
`git show ${generatedBranch} -s --format=%H`
);

return `${commentText.codegen.header}
${commentText.codegen.body(branch, commit, PR_NUMBER, generatedCommit)}`;
${commentText.codegen.body(
generatedBranch,
baseCommit,
PR_NUMBER,
generatedCommit
)}`;
}

/**
Expand Down

0 comments on commit 7feda55

Please sign in to comment.