You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tools doesn't manage to detect some merge commits, leading to omissions and errors
Current behavior
This commit is not recognized as a merge commit, which leads to:
Traceback (most recent call last):
File ".../bin/changelog", line 8, in <module>
sys.exit(main())
File ".../lib/python3.7/site-packages/changelog/__init__.py", line 233, in main
changelog = generate_changelog(**vars(args))
File ".../lib/python3.7/site-packages/changelog/__init__.py", line 196, in generate_changelog
prs = fetch_changes(github_config, owner, repo, previous_tag, current_tag)
File ".../lib/python3.7/site-packages/changelog/__init__.py", line 166, in fetch_changes
branch))
Exception: Lots of commits and no PRs on branch master
Expected behavior
This commit should be recognized
Steps to replicate behavior (include URLs)
Run changelog peopledoc septentrion (as of today. Not sure it will last)
Alternative: clone https://github.com/peopledoc/septentrion, delete all commits after 138f7489abb4b05eb0383bc6e5e083359515d943 push, and run on the resulting repo
Screenshots
See traceback above
Leads
As far as I can tell, it's not detected because of the lack of 2 newlines following the standard message. I have no idea why GitHub decided not to put those new lines, but I suspect it's because my branch name was too long. You're welcome to try and see if you can reproduce with a long branch name.
So looking at the code, I see that detecting a merge commit is based on its message. This is likely to often break. The merge commit message is completely arbitrary and can be changed manually. A much stronger approach could be, e.g., to select commits with multiple parents (https://developer.github.com/v3/repos/commits/). Then we could match the pull requests using the pulls api (sadly there's no filter on merge commit sha).
The tools doesn't manage to detect some merge commits, leading to omissions and errors
Current behavior
This commit is not recognized as a merge commit, which leads to:
Expected behavior
This commit should be recognized
Steps to replicate behavior (include URLs)
Run
changelog peopledoc septentrion
(as of today. Not sure it will last)Alternative: clone https://github.com/peopledoc/septentrion, delete all commits after 138f7489abb4b05eb0383bc6e5e083359515d943 push, and run on the resulting repo
Screenshots
See traceback above
Leads
As far as I can tell, it's not detected because of the lack of 2 newlines following the standard message. I have no idea why GitHub decided not to put those new lines, but I suspect it's because my branch name was too long. You're welcome to try and see if you can reproduce with a long branch name.
So looking at the code, I see that detecting a merge commit is based on its message. This is likely to often break. The merge commit message is completely arbitrary and can be changed manually. A much stronger approach could be, e.g., to select commits with multiple parents (https://developer.github.com/v3/repos/commits/). Then we could match the pull requests using the pulls api (sadly there's no filter on merge commit sha).
Another approach could be using the graphql api (https://github.community/t5/GitHub-API-Development-and/Get-pull-request-associated-with-a-commit/td-p/16434) but it needs a token, anonymous graphql is not authorized.
The text was updated successfully, but these errors were encountered: