mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-07 13:33:32 +02:00
fix unsafe casting for --quiet flag
This commit is contained in:
+16
-16
@@ -157,7 +157,7 @@ func (c *Cli) CmdWorklog(action string, issue string) error {
|
|||||||
|
|
||||||
if resp.StatusCode == 201 {
|
if resp.StatusCode == 201 {
|
||||||
c.Browse(issue)
|
c.Browse(issue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -210,7 +210,7 @@ func (c *Cli) CmdEdit(issue string) error {
|
|||||||
|
|
||||||
if resp.StatusCode == 204 {
|
if resp.StatusCode == 204 {
|
||||||
c.Browse(issueData["key"].(string))
|
c.Browse(issueData["key"].(string))
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issueData["key"], c.endpoint, issueData["key"])
|
fmt.Printf("OK %s %s/browse/%s\n", issueData["key"], c.endpoint, issueData["key"])
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -416,7 +416,7 @@ func (c *Cli) CmdCreate() error {
|
|||||||
"issue": key,
|
"issue": key,
|
||||||
"link": link,
|
"link": link,
|
||||||
})
|
})
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s\n", key, link)
|
fmt.Printf("OK %s %s\n", key, link)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -506,7 +506,7 @@ func (c *Cli) CmdSubtask(issue string) error {
|
|||||||
"issue": key,
|
"issue": key,
|
||||||
"link": link,
|
"link": link,
|
||||||
})
|
})
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s\n", key, link)
|
fmt.Printf("OK %s %s\n", key, link)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -562,7 +562,7 @@ func (c *Cli) CmdIssueLink(inwardIssue string, issueLinkTypeName string, outward
|
|||||||
}
|
}
|
||||||
if resp.StatusCode == 201 {
|
if resp.StatusCode == 201 {
|
||||||
c.Browse(inwardIssue)
|
c.Browse(inwardIssue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", inwardIssue, c.endpoint, inwardIssue)
|
fmt.Printf("OK %s %s/browse/%s\n", inwardIssue, c.endpoint, inwardIssue)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -606,7 +606,7 @@ func (c *Cli) CmdBlocks(blocker string, issue string) error {
|
|||||||
}
|
}
|
||||||
if resp.StatusCode == 201 {
|
if resp.StatusCode == 201 {
|
||||||
c.Browse(issue)
|
c.Browse(issue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -651,7 +651,7 @@ func (c *Cli) CmdDups(duplicate string, issue string) error {
|
|||||||
}
|
}
|
||||||
if resp.StatusCode == 201 {
|
if resp.StatusCode == 201 {
|
||||||
c.Browse(issue)
|
c.Browse(issue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -699,7 +699,7 @@ func (c *Cli) CmdWatch(issue string, watcher string, remove bool) error {
|
|||||||
}
|
}
|
||||||
if resp.StatusCode == 204 {
|
if resp.StatusCode == 204 {
|
||||||
c.Browse(issue)
|
c.Browse(issue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -743,7 +743,7 @@ func (c *Cli) CmdVote(issue string, up bool) error {
|
|||||||
}
|
}
|
||||||
if resp.StatusCode == 204 {
|
if resp.StatusCode == 204 {
|
||||||
c.Browse(issue)
|
c.Browse(issue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -766,7 +766,7 @@ func (c *Cli) CmdRankAfter(issue, after string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -778,7 +778,7 @@ func (c *Cli) CmdRankBefore(issue, before string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -829,7 +829,7 @@ func (c *Cli) CmdTransition(issue string, trans string) error {
|
|||||||
}
|
}
|
||||||
if resp.StatusCode == 204 {
|
if resp.StatusCode == 204 {
|
||||||
c.Browse(issue)
|
c.Browse(issue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -899,7 +899,7 @@ func (c *Cli) CmdComment(issue string) error {
|
|||||||
|
|
||||||
if resp.StatusCode == 201 {
|
if resp.StatusCode == 201 {
|
||||||
c.Browse(issue)
|
c.Browse(issue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -959,7 +959,7 @@ func (c *Cli) CmdComponent(action string, project string, name string, desc stri
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if resp.StatusCode == 201 {
|
if resp.StatusCode == 201 {
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s\n", project, name)
|
fmt.Printf("OK %s %s\n", project, name)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -994,7 +994,7 @@ func (c *Cli) CmdLabels(action string, issue string, labels []string) error {
|
|||||||
|
|
||||||
if resp.StatusCode == 204 {
|
if resp.StatusCode == 204 {
|
||||||
c.Browse(issue)
|
c.Browse(issue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -1069,7 +1069,7 @@ func (c *Cli) CmdAssign(issue string, user string) error {
|
|||||||
}
|
}
|
||||||
if resp.StatusCode == 204 {
|
if resp.StatusCode == 204 {
|
||||||
c.Browse(issue)
|
c.Browse(issue)
|
||||||
if !c.opts["quiet"].(bool) {
|
if !c.GetOptBool("quiet", false) {
|
||||||
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
fmt.Printf("OK %s %s/browse/%s\n", issue, c.endpoint, issue)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user