googleapis / googleapis/release-please
Chronological commit sorting means that merged PRs can be ignored
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
#### Environment details
- OS: macOS 12.4
- Node.js version: 16.14.0
- npm version: 8.5.4
- `release-please` version: 13.19.3
#### Steps to reproduce
1. Make commits to branch `foo` and create a PR
2. Make commits to branch `bar` and create a PR
3. Merge `bar`'s PR and then the release-please PR created thereafter
4. Merge `foo` into `main` (without rebasing first!)
5. Observe that the commits from `foo` are ignored by release-please
This happens because the commits are pulled from GitHub's API in chronological order (i.e., using `git log --date-order`) rather than topological order (i.e., using `git log --topo-order`.) This means that the order of commits is `foo, bar, bar merge commit, release-please, release-please merge commit, foo merge commit`. release-please will only consider commits since its last release, so will slice away any commits before `release-please merge commit`, leaving only `foo merge commit` but none of the commits from `foo`! Topological sorting would instead produce the desired order of `bar, bar merge commit, release-please, release-please merge commit, foo, foo merge commit`, as it traverses the all the child commits before showing newer commits.
Contributor guide
Assessment
This issue has not been assessed yet.