Add Bitbucket Cloud Support to Frogbot#1050
Open
adityajalkhare wants to merge 2 commits intojfrog:devfrom
Open
Add Bitbucket Cloud Support to Frogbot#1050adityajalkhare wants to merge 2 commits intojfrog:devfrom
adityajalkhare wants to merge 2 commits intojfrog:devfrom
Conversation
Author
|
I have read the CLA Document and I hereby sign the CLA |
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 Bitbucket Cloud as a VCS provider in Frogbot. Joins existing platforms: GitHub, GitLab, Bitbucket Server, and Azure Repos.
Motivation
Bitbucket Cloud is used by many teams but was not previously supported. The froggit-go v1.21.0 library already includes a Bitbucket Cloud client, so this PR wires it into Frogbot's provider detection and configuration.
Changes
1. Added BitbucketCloud Provider Constant
File:
utils/consts.goBitbucketCloud vcsProvider = "bitbucketCloud"to the vcsProvider enum2. Updated Provider Detection Logic
File:
utils/params.goextractVcsProviderFromEnv()to recognizeJF_GIT_PROVIDER=bitbucketCloud3. Configured Output Writer
File:
utils/outputwriter/outputwriter.goGetCompatibleOutputWriter()to returnSimplifiedOutputfor BitbucketCloud4. Added Integration Tests
File:
bitbucket_cloud_test.go5. Documentation
File:
BITBUCKET_CLOUD_IMPLEMENTATION.mdConfiguration Example
Key Implementation Details
Authentication
JF_GIT_USERNAMEandJF_GIT_TOKENhttps://api.bitbucket.org/2.0)Output Format
Uses
SimplifiedOutput(same as BitbucketServer) because:Dependencies
froggit-go v1.21.0BitbucketCloud clientktrysmt/go-bitbucketalready in go.modKnown Limitations
froggit-go Implementation Gaps
errBitbucketAddPullRequestReviewCommentsNotSupportederrBitbucketDeletePullRequestCommenterrBitbucketGetCommitsNotSupported, limiting email notification featuresBitbucket Cloud API Limitations
Rate Limiting Considerations
Bitbucket Cloud enforces strict rate limits:
froggit-go does not currently implement:
For large repositories or frequent scans, you may encounter
429 Too Many Requestserrors. Recommended mitigations:.frogbot/frogbot-config.yml)JF_DISABLE_ADVANCED_SECURITY=true) to reduce API callsJF_MIN_SEVERITY=HIGH)See
BITBUCKET_CLOUD_IMPLEMENTATION.mdfor details.Testing
Manual Testing
To test manually, set environment variables:
Update test repository details in
bitbucket_cloud_test.go, then run:go test -v -run TestBitbucketCloudTest Coverage
Backward Compatibility
No breaking changes:
JF_GIT_PROVIDER=bitbucketCloudChecklist
utils/consts.goutils/params.goutils/outputwriter/outputwriter.gobitbucket_cloud_test.goBITBUCKET_CLOUD_IMPLEMENTATION.mdReferences
Related Issues
Closes #[323]