Skip to content

Commit e41c874

Browse files
authored
fix(ci): wrong generated commit (#261)
1 parent 253db2a commit e41c874

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

scripts/ci/codegen/upsertGenerationComment.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,21 @@ ${commentText[trigger].body}`;
3030
}
3131

3232
const baseBranch = await run('git branch --show-current');
33-
const commit = await run(`git show ${baseBranch} -s --format=%H`);
34-
const generatedCommit = await run('git show -s --format=%H');
35-
const branch = `generated/${baseBranch}`;
33+
const baseCommit = await run(`git show ${baseBranch} -s --format=%H`);
34+
35+
const generatedBranch = `generated/${baseBranch}`;
36+
const generatedCommit = await run(
37+
`git show ${generatedBranch} -s --format=%H`
38+
);
3639

3740
return `${commentText.codegen.header}
3841
39-
${commentText.codegen.body(branch, commit, PR_NUMBER, generatedCommit)}`;
42+
${commentText.codegen.body(
43+
generatedBranch,
44+
baseCommit,
45+
PR_NUMBER,
46+
generatedCommit
47+
)}`;
4048
}
4149

4250
/**

0 commit comments

Comments
 (0)