Skip to content

Commit

Permalink
Remove jira issue type
Browse files Browse the repository at this point in the history
Replaces --issue-type with a string flag. This allows for more
flexibility as each project may have different set of types. Validation
is performed on execution of the brew command.

Updated help text as well with examples and a default of Bug
  • Loading branch information
kunickiaj committed Jul 10, 2019
1 parent a461e47 commit 061aefc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 40 deletions.
6 changes: 3 additions & 3 deletions cmd/brew.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const docImpactKey = "Doc Impact"

var description string
var docImpact bool
var issueType jiraIssueType
var issueType string
var components []string
var labels []string
var projectKey string
Expand All @@ -60,7 +60,7 @@ func init() {
RootCmd.AddCommand(brewCmd)

brewCmd.Flags().StringVarP(&projectKey, "project", "p", "", "JIRA project key, e.g. SDC, SDCE")
brewCmd.Flags().VarP(&issueType, "issue-type", "t", "Issue type to create")
brewCmd.Flags().StringVarP(&issueType, "issue-type", "t", "Bug", "Issue type to create, e.g. Bug, 'New Feature', etc. This varies by project.")
brewCmd.Flags().StringVarP(&summary, "summary", "s", "", "Issue summary")
brewCmd.Flags().StringVarP(&description, "description", "d", "", "Issue detailed description. If not specified defaults to summary")
brewCmd.Flags().BoolVarP(&docImpact, "doc-impact", "x", false, "When included, sets the Doc Impact field to 'Yes'")
Expand Down Expand Up @@ -153,7 +153,7 @@ func brew(cmd *cobra.Command, args []string) {
return
}

metaIssueType, err := createMetaIssueType(metaProject, string(issueType))
metaIssueType, err := createMetaIssueType(metaProject, issueType)
if err != nil {
log.WithField("error", err).Fatal()
return
Expand Down
37 changes: 0 additions & 37 deletions cmd/jira_issue_type.go

This file was deleted.

0 comments on commit 061aefc

Please sign in to comment.