Last active
August 6, 2021 12:44
-
-
Save percybolmer/95bc8556f35a5a4489401ac45c2894bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// getIssueTransition will grab the available transitions for a issue | |
func getIssueTransition(client *jira.Client, issue jira.Issue, status string) (jira.Transition, error) { | |
transitions, _, err := client.Issue.GetTransitions(issue.Key) | |
if err != nil { | |
return jira.Transition{}, err | |
} | |
for _, t := range transitions { | |
if t.Name == status { | |
return t, nil | |
} | |
} | |
return jira.Transition{}, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment