Skip to content

feat: add support for Bitbucket to git-open-pr and git-wait-for-pr#3209

Merged
hiddeco merged 13 commits intoakuity:mainfrom
chamodshehanka:feature/bitbucket-provider
Apr 25, 2025
Merged

feat: add support for Bitbucket to git-open-pr and git-wait-for-pr#3209
hiddeco merged 13 commits intoakuity:mainfrom
chamodshehanka:feature/bitbucket-provider

Conversation

@chamodshehanka
Copy link
Contributor

@chamodshehanka chamodshehanka commented Jan 4, 2025

Closes: #2569

Added support for Bitbucket provider in gitprovider.
For now I opened a WIP PR

TODO

  • Complete the convertBitbucketPR function
  • Handle the interface{} type - The Bitbucket library returns interface{} for some fields. You need to properly type assert these fields to extract the necessary information
  • Test the implementation

@chamodshehanka chamodshehanka requested a review from a team as a code owner January 4, 2025 16:34
@netlify
Copy link

netlify bot commented Jan 4, 2025

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit a1c8b8f
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/680b57a536077300086a76dd
😎 Deploy Preview https://deploy-preview-3209.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@chamodshehanka chamodshehanka marked this pull request as draft January 4, 2025 16:36
@krancour krancour added kind/enhancement An entirely new feature area/controller Affects the (main) controller priority/low Low commitment from maintainers; progress is likely to be community-driven labels Jan 4, 2025
@krancour krancour added this to the v1.3.0 milestone Feb 4, 2025
@chamodshehanka chamodshehanka changed the title [WIP] feat: Add support for Bitbucket provider in gitprovider feat: Add support for Bitbucket provider in gitprovider Feb 22, 2025
@krancour krancour modified the milestones: v1.3.0, v1.4.0 Feb 23, 2025
@chamodshehanka
Copy link
Contributor Author

chamodshehanka commented Mar 16, 2025

@krancour could you please help/guide me to up and running this in local, so can test this implementation?

Thanks

@hiddeco
Copy link
Collaborator

hiddeco commented Mar 24, 2025

Hey @chamodshehanka,

Information about how Kargo can be run locally can be found here: https://docs.kargo.io/contributor-guide/hacking-on-kargo#iterating-quickly

However, as we would like to have this included in 1.4.0. You can leave this with me for now, and I will do the due diligence on rebasing and testing this pull request if this is alright with you.

@chamodshehanka
Copy link
Contributor Author

hiddeco

Thanks for sharing the guide. yah! That's totally fine with me.

@chamodshehanka chamodshehanka marked this pull request as ready for review March 26, 2025 02:50
@codecov
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 91.16279% with 19 lines in your changes missing coverage. Please review.

Project coverage is 52.88%. Comparing base (26c83f5) to head (a1c8b8f).
Report is 30 commits behind head on main.

Files with missing lines Patch % Lines
internal/gitprovider/bitbucket/bitbucket.go 91.16% 15 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3209      +/-   ##
==========================================
+ Coverage   52.41%   52.88%   +0.47%     
==========================================
  Files         309      309              
  Lines       27631    28011     +380     
==========================================
+ Hits        14483    14814     +331     
- Misses      12369    12412      +43     
- Partials      779      785       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hiddeco
Copy link
Collaborator

hiddeco commented Mar 26, 2025

Due to the remaining // TODOs in the last commit, I do not think we will be able to include this in the upcoming 1.4.0 release.

chamodshehanka and others added 4 commits April 2, 2025 22:02
Signed-off-by: chamodshehanka <hcsperera@gmail.com>

# Conflicts:
#	go.mod
#	go.sum
Co-authored-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: chamodshehanka <hcsperera@gmail.com>
- Properly configure token authentication
- Set repository owner and repo slug at all times
- Properly consume responses
- Minimize pull request shim to fields we use
- Properly JSON roundtrip response
- Restrict implementation to Bitbucket Cloud (i.e. bitbucket.org)
- Properly register provider in runners

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@chamodshehanka chamodshehanka requested a review from a team as a code owner April 2, 2025 16:40
@chamodshehanka chamodshehanka closed this by deleting the head repository Apr 3, 2025
@chamodshehanka
Copy link
Contributor Author

My fork repo got accidentally deleted, I'm trying to restore it by contacting github support or else I'll open a new PR

@chamodshehanka chamodshehanka reopened this Apr 3, 2025
@krancour
Copy link
Member

krancour commented Apr 9, 2025

I took care of the merge conflicts in go.mod and go.sum.

Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
krancour and others added 6 commits April 15, 2025 11:35
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco hiddeco changed the title feat: Add support for Bitbucket provider in gitprovider feat: add support for Bitbucket to git-open-pr and git-wait-for-pr Apr 25, 2025
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco
Copy link
Collaborator

hiddeco commented Apr 25, 2025

I finished the last // TODO comments from when I dropped the ball last time and tested it end-to-end. Based on this, everything seems to work as expected.

@hiddeco hiddeco added this pull request to the merge queue Apr 25, 2025
Merged via the queue into akuity:main with commit 9ef894d Apr 25, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/controller Affects the (main) controller kind/enhancement An entirely new feature priority/low Low commitment from maintainers; progress is likely to be community-driven

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Promotion / create PR feature for Bitbucket server

3 participants

Comments