Repository navigation
🐛 fix(fragments): link PRs from the squash commit subject - #55
Merged
Merged
Conversation
The pipdeptree 4.2.13 release credited five fragments to a display name with no PR link: GitHub returned no associated pull request for their squash commits, although each PR's merge commit is that commit and the subject ends with its number. The run logged the fallback and kept going. When the association is empty, the linker now reads the trailing (#N) from the commit subject and takes PR N only if it merged as that commit, so a subject that cites some other PR links nothing. A fragment still without a PR now fails the command and lists each such fragment with its commit. Crediting the commit author stays available behind --credit-commit-author for merge-commit and rebase-merge workflows, where no squash commit exists.
Documentation build overview
|
A release must not stop for a fragment without a merged pull request. Drop the --credit-commit-author flag and the failure; the subject (#N) fallback covers GitHub's missing commit-to-PR association, and the commit author credit stays the last resort for merge commits and direct pushes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Prepare releaserun for pipdeptree 4.2.13 credited five fragments toBernát Gáborwith no PR link. 🐛 GitHub returned no associated pull request for squash commits312a6d0(#845),d777302(#846),2d7eaf0(#848),1378a80(#854) anda5681ef(#852), through both REST and GraphQL, even though each PR's merge commit is that commit and each subject ends with its number. tox-dev/pipdeptree#863 repairs that changelog by hand.When GitHub associates no squash-merged PR with a fragment's commit,
fragmentsnow reads the(#N)that ends the commit subject and fetches PR N. It links that PR only when PR N merged and its merge commit is the fragment's commit, so a subject that cites some other PR links nothing. A PR found this way gets the same credits as an associated one.The command never fails over a missing PR. A fragment that neither lookup links, as after a merge commit, rebase merge or direct push, still credits its commit author as before. Run against the five pipdeptree commits above, the resolver now links #845, #846, #848, #854 and #852 to
@gaborbernat.