Skip to content

Bitbucket commit status name not applied #1268

@codetent

Description

@codetent

Currently, the name of the commit status is not changed if the commitStatusExpr is set in a bitbucket provider.

I looked it up and it seems that the generated commit status (using the commitStatusExpr) is only used for key, the visible name itself is created by formatNameAndDescription with a fixed format.

name, desc := formatNameAndDescription(event)
id := b.CommitStatus
// key has a limitation of 40 characters in bitbucket api
key := sha1String(id)

cmo := &bitbucket.CommitsOptions{
	Owner:    b.Owner,
	RepoSlug: b.Repo,
	Revision: rev,
}
cso := &bitbucket.CommitStatusOptions{
	State:       state,
	Key:         key,
	Name:        name,
	Description: desc,
	Url:         "https://bitbucket.org",
}

What I would expect is that the name is actually b.CommitStatus instead, since this name is the one visible to users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions