diff --git a/cli.go b/cli.go index 3fa4140d..827688ce 100644 --- a/cli.go +++ b/cli.go @@ -538,13 +538,17 @@ func (c *Cli) FindIssues() (interface{}, error) { return data, nil } +// RankOrder type used to specify before/after ranking arguments to RankIssue type RankOrder int const ( + // RANKBEFORE should be used to rank issue before the target issue RANKBEFORE RankOrder = iota + // RANKAFTER should be used to rank issue after the target issue RANKAFTER RankOrder = iota ) +// RankIssue will modify issue to have rank before or after the target issue func (c *Cli) RankIssue(issue, target string, order RankOrder) error { type RankRequest struct { Issues []string `json:"issues"` diff --git a/commands.go b/commands.go index b9a8469f..68e058e9 100644 --- a/commands.go +++ b/commands.go @@ -645,6 +645,7 @@ func (c *Cli) CmdVote(issue string, up bool) error { return nil } +// CmdRankAfter rank issue after target issue func (c *Cli) CmdRankAfter(issue, after string) error { err := c.RankIssue(issue, after, RANKAFTER) if err != nil { @@ -656,6 +657,7 @@ func (c *Cli) CmdRankAfter(issue, after string) error { return nil } +// CmdRankBefore rank issue before target issue func (c *Cli) CmdRankBefore(issue, before string) error { err := c.RankIssue(issue, before, RANKBEFORE) if err != nil {