fix: return GitHub no-squash commits in order (#115)

Fixes: https://github.com/kiegroup/git-backporting/issues/114
This commit is contained in:
Earl Warren 2024-04-02 11:17:41 +02:00 committed by GitHub
parent fe6be83074
commit 6d9b9db590
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

2
dist/cli/index.js vendored
View file

@ -1469,7 +1469,7 @@ class Runner {
}
// 7. apply all changes to the new branch
this.logger.debug("Cherry picking commits..");
for (const sha of originalPR.commits) {
for (const sha of originalPR.commits.reverse()) {
await git.gitCli.cherryPick(configs.folder, sha, configs.mergeStrategy, configs.mergeStrategyOption, configs.cherryPickOptions);
}
if (!configs.dryRun) {