mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-09-05 20:07:25 +00:00
Add refname to bitbucket commit status (#6482)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user