Repository navigation
Return typed Bitbucket and Azure comparison commits - #16962
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the refactor that moves comparison-response decoding into typed client records.
No open issues 🎉
1 file not reviewed
sorbet/rbi/shims/bitbucket_with_retries.rbi: File type not supported
What changed in this PR
This PR moves Bitbucket and Azure comparison-response decoding into the clients, returning typed ComparisonCommit records while preserving CommitsFinder’s existing hash output.
Changes:
- Add an immutable commit record with typed fields and hash conversion.
- Decode required fields at the client boundary and remove redundant parsing helpers.
- Update the retry-client signature and add coverage for ordering, empty results, and malformed fields.
| File | Description |
|---|---|
sorbet/rbi/shims/bitbucket_with_retries.rbi |
Update the comparison return type to typed records. |
common/spec/dependabot/clients/comparison_commit_spec.rb |
Test comparison decoding for both providers. |
common/lib/dependabot/metadata_finders/base/commits_finder.rb |
Convert typed records to the existing hash output. |
common/lib/dependabot/metadata_finders/base/commit_response_parser.rb |
Remove the Azure field parser now handled by the client. |
common/lib/dependabot/clients/json_response_parser.rb |
Remove the obsolete string-path validation helper. |
common/lib/dependabot/clients/comparison_commit.rb |
Define the immutable commit record and hash conversion. |
common/lib/dependabot/clients/bitbucket.rb |
Decode comparison responses into typed records. |
common/lib/dependabot/clients/azure.rb |
Decode comparison responses and validate required fields. |
Review effort: Balanced
JamieMagee
force-pushed
the
jamiemagee/typed-comparison-commits
branch
from
November 18, 2026 17:22
0678c5a to
61840d1
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change moving Bitbucket and Azure comparison decoding into typed client records.
No open issues 🎉
1 file not reviewed
sorbet/rbi/shims/bitbucket_with_retries.rbi: File type not supported
Review effort: Balanced
jeffwidman
approved these changes
Nov 18, 2026
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.
What are you trying to accomplish?
Parse Bitbucket and Azure comparison responses into immutable
ComparisonCommitrecords so metadata readers can use typed fields.Anything you want to highlight for special attention from reviewers?
The clients'
comparereturn types change;CommitsFinderkeeps the same hash output. Required commit fields are decoded at the client boundary with contextualPrivateSourceBadResponseerrors.How will you know you've accomplished your goal?
Passed in containers:
The full common suite was not run.
Checklist