Use commit status as Bitbucket Name - #1357
Conversation
33d7fb7 to
4774a92
Compare
|
@stefanprodan This looks like a bug, what do you think? |
|
Yes looks like it, we could backport. |
|
@zanarellidev Can you pls run a manual test of this bugfix e2e with a Bitbucket account and post some screenshots? Maybe also with Bitbucket Server if not too hard |
|
@matheuscscp Hi Matheus! Both Bitbucket Cloud and Bitbucket Server flows are covered with mock HTTP servers matching the respective REST API specs:
Both pass with |
|
Hi @zanarellidev Like I said, I'd need you to test e2e with real Bitbucket Cloud and/or Server, merging something based on mock tests like this is too risky, we always ask contributors touching notification providers to test e2e. |
|
@matheuscscp Set up a real Bitbucket Cloud account and ran the end-to-end verification with the fix applied. E2E Test Results (Bitbucket Cloud)
{
"key": "2d18c5818fb67b51bade54fe0308ccc8db48992a",
"type": "build",
"state": "SUCCESSFUL",
"name": "flux/kustomization/production-cluster",
"description": "apply succeeded",
"url": "https://bitbucket.org"
}The
Ready for review! |
|
Thanks @zanarellidev, now please squash, rebase and force-push for merge 🙏 |
Use CommitStatus for Name in both Bitbucket Cloud and Bitbucket Server so that commitStatusExpr is visible in the Bitbucket UI, matching the behavior of GitHub, GitLab, and Azure DevOps providers. Fixes fluxcd#1268 Signed-off-by: zanarelli <zanarelli.dev@gmail.com>
4774a92 to
6e55a93
Compare
|
@matheuscscp Done! Rebased on latest main and squashed into a single clean commit with DCO sign-off. All tests passing 👍 |
|
Thanks! I'm waiting until dependabot upgrades the backport workflow to |

Summary
formatNameAndDescriptionfor the visibleName, sospec.commitStatusExpronly influenced the hashedKey.CommitStatusasName, matching GitHub/GitLab/Azure DevOps.bitbucketserver.go); fixed the same way, keeping the Server UIName [description]suffix.Test plan
go test -count=1 -run TestBitbucket_Post_UsesCommitStatusAsName ./internal/notifier/go test -count=1 -run TestBitbucketServer_Post_UsesCommitStatusAsName ./internal/notifier/kustomization/hello-world [reason]); pass-after with fixgo test -count=1 ./internal/notifier/