helpers

package
v0.0.0-...-3af1840 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	QAContactField        = "customfield_12315948"
	SeverityField         = "customfield_12316142"
	TargetVersionField    = "customfield_12319940"
	TargetVersionFieldOld = "customfield_12323140"
	ReleaseBlockerField   = "customfield_12319743"
	ReleaseNoteTextField  = "customfield_12317313"
	SprintField           = "customfield_12310940"
	ReleaseNoteTypeField  = "customfield_12320850"
)

Variables

This section is empty.

Functions

func GetActiveSprintID

func GetActiveSprintID(sprintField interface{}) (int, error)

func GetIssueQaContact

func GetIssueQaContact(issue *jira.Issue) (*jira.User, error)

func GetIssueReleaseNoteText

func GetIssueReleaseNoteText(issue *jira.Issue) (*string, error)

func GetIssueTargetVersion

func GetIssueTargetVersion(issue *jira.Issue) ([]*jira.Version, error)

func GetSprintField

func GetSprintField(issue *jira.Issue) interface{}

GetSprintField returns a raw interface for the Sprint value of an issue if it exists. Currently, the value is only used during cloning, so no struct is currently needed for us to parse data from the interface.

func GetUnknownField

func GetUnknownField(field string, issue *jira.Issue, fn func() interface{}) (bool, error)

GetUnknownField will attempt to get the specified field from the Unknowns struct and unmarshal the value into the provided function. If the field is not set, the first return value of this function will return false.

Types

type CustomField

type CustomField struct {
	Self     string `json:"self"`
	ID       string `json:"id"`
	Value    string `json:"value"`
	Disabled bool   `json:"disabled"`
}

func GetIssueReleaseNoteType

func GetIssueReleaseNoteType(issue *jira.Issue) (*CustomField, error)

func GetIssueSeverity

func GetIssueSeverity(issue *jira.Issue) (*CustomField, error)

type SecurityLevel

type SecurityLevel struct {
	Self        string `json:"self"`
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

func GetIssueSecurityLevel

func GetIssueSecurityLevel(issue *jira.Issue) (*SecurityLevel, error)

GetIssueSecurityLevel returns the security level of an issue. If no security level is set for the issue, the returned SecurityLevel and error will both be nil and the issue will follow the default project security level.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL