feat(bitbucket): add inline PR comment support for specific lines and files - #1662
Open
mrcrysta1 wants to merge 1 commit into
Open
feat(bitbucket): add inline PR comment support for specific lines and files#1662mrcrysta1 wants to merge 1 commit into
mrcrysta1 wants to merge 1 commit into
Conversation
… files Adds add_pull_request_inline_comment() for Bitbucket Server/Data Center REST API. Supports both RANGE (whole-file) and COMMIT (line-level) anchor-based comments with configurable line type, file type, and threaded replies via parent_id. 4 new tests covering range, commit, parent threading, and custom srcPath scenarios.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1662 +/- ##
==========================================
+ Coverage 59.74% 60.61% +0.87%
==========================================
Files 101 106 +5
Lines 16868 18059 +1191
Branches 1746 1845 +99
==========================================
+ Hits 10077 10947 +870
- Misses 6393 6650 +257
- Partials 398 462 +64 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Adds
add_pull_request_inline_comment()method for Bitbucket Server / Data Center REST API, resolving #1439.This enables adding comments on specific lines or entire files within a pull request diff — a feature previously missing from the Python SDK.
Changes
add_pull_request_inline_comment()inBitbucketclass (atlassian/bitbucket/__init__.py)srcPathfor renamed filesUsage
Parameters
pathfrom_hashto_hashlinediffType=COMMIT)line_typeADDED,REMOVED, orCONTEXTdiff_typeRANGE(whole-file) orCOMMIT(line-level)file_typeFROMorTO— which side of the diffsrc_pathpath)parent_idTests
All 15 tests passing (11 existing + 4 new). Lint clean.
Closes
Closes #1439
This is my first contribution to this project. AI assistance (GitHub Copilot) was used for code generation and documentation. All code has been reviewed and tested locally before submission.