Add refname to bitbucket commit status (#6482)

This commit is contained in:
Lê Hoàng Phương
2026-04-22 10:39:37 +02:00
committed by GitHub
parent f1bf85f7e1
commit 5ed9fc6b0e
2 changed files with 11 additions and 5 deletions
+5
View File
@@ -327,6 +327,11 @@ func (c *config) Status(ctx context.Context, user *model.User, repo *model.Repo,
Key: common.GetPipelineStatusContext(repo, pipeline, workflow),
URL: common.GetPipelineStatusURL(repo, pipeline, workflow),
}
if pipeline.Event == model.EventPush || pipeline.IsPullRequest() {
status.Refname = pipeline.Branch
}
return c.newClient(ctx, user).CreateStatus(repo.Owner, repo.Name, pipeline.Commit, &status)
}
+6 -5
View File
@@ -52,11 +52,12 @@ type WorkspacesResp struct {
}
type PipelineStatus struct {
State string `json:"state"`
Key string `json:"key"`
Name string `json:"name,omitempty"`
URL string `json:"url"`
Desc string `json:"description,omitempty"`
State string `json:"state"`
Key string `json:"key"`
Name string `json:"name,omitempty"`
URL string `json:"url"`
Desc string `json:"description,omitempty"`
Refname string `json:"refname,omitempty"`
}
type Email struct {