Hello, as far as I can understand this code
|
base: commits[commits.length - 2].sha, |
in case of synchronize PR event this action only looks at the last commit. However not always a push adds only 1 commit.
Why not use github.event.before instead? It can cause issues in cases of merges from master/main into the current branch and in cases of rebasing the current branch. Therefore, before can be used only when the branch state is base -> before -> head, and in all other cases, it can fall back to the current solution with the last commit.
Hello, as far as I can understand this code
ChatGPT-CodeReview/src/bot.ts
Line 102 in 763282a
in case of synchronize PR event this action only looks at the last commit. However not always a push adds only 1 commit.
Why not use
github.event.beforeinstead? It can cause issues in cases of merges from master/main into the current branch and in cases of rebasing the current branch. Therefore,beforecan be used only when the branch state isbase->before->head, and in all other cases, it can fall back to the current solution with the last commit.