Fix BB ambiguous commit status key (#4544)

Co-authored-by: Joan Flotats <joanflotats@bit2me.com>
This commit is contained in:
Joan Flotats 2024-12-09 16:23:46 +01:00 committed by GitHub
parent 013647340c
commit 21755bef4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -290,11 +290,11 @@ func (c *config) Dir(ctx context.Context, u *model.User, r *model.Repo, p *model
} }
// Status creates a pipeline status for the Bitbucket commit. // Status creates a pipeline status for the Bitbucket commit.
func (c *config) Status(ctx context.Context, user *model.User, repo *model.Repo, pipeline *model.Pipeline, _ *model.Workflow) error { func (c *config) Status(ctx context.Context, user *model.User, repo *model.Repo, pipeline *model.Pipeline, workflow *model.Workflow) error {
status := internal.PipelineStatus{ status := internal.PipelineStatus{
State: convertStatus(pipeline.Status), State: convertStatus(pipeline.Status),
Desc: common.GetPipelineStatusDescription(pipeline.Status), Desc: common.GetPipelineStatusDescription(pipeline.Status),
Key: "Woodpecker", Key: common.GetPipelineStatusContext(repo, pipeline, workflow),
URL: common.GetPipelineStatusURL(repo, pipeline, nil), URL: common.GetPipelineStatusURL(repo, pipeline, nil),
} }
return c.newClient(ctx, user).CreateStatus(repo.Owner, repo.Name, pipeline.Commit, &status) return c.newClient(ctx, user).CreateStatus(repo.Owner, repo.Name, pipeline.Commit, &status)