Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "issue", Short: "Manage issues", Run: func(cmd *cobra.Command, args []string) { fmt.Println("Issue requires a subcommand:") for _, command := range cmd.Commands() { fmt.Println(command.Name()) } }, }
Command represents this folder's command
Functions ¶
Types ¶
type Change ¶
type ChangeSet ¶
type ChangeSet struct {
Assignee *Change `json:"assignee,omitempty" mapstructure:"assignee,omitempty"`
Kind *Change `json:"kind,omitempty" mapstructure:"kind,omitempty"`
Priority *Change `json:"priority,omitempty" mapstructure:"priority,omitempty"`
State *Change `json:"state,omitempty" mapstructure:"state,omitempty"`
Title *Change `json:"title,omitempty" mapstructure:"title,omitempty"`
Content *Change `json:"content,omitempty" mapstructure:"content,omitempty"`
Milestone *Change `json:"milestone,omitempty" mapstructure:"milestone,omitempty"`
Component *Change `json:"component,omitempty" mapstructure:"component,omitempty"`
Version *Change `json:"version,omitempty" mapstructure:"version,omitempty"`
}
type Issue ¶
type Issue struct {
Type string `json:"type" mapstructure:"type"`
ID int `json:"id" mapstructure:"id"`
Kind string `json:"kind" mapstructure:"kind"` // bug, enhancement, proposal, task
Title string `json:"title" mapstructure:"title"`
State string `json:"state" mapstructure:"state"` // new, open, submitted, resolved, on hold, invalid, duplicate, wontfix, closed
Priority string `json:"priority" mapstructure:"priority"` // trivial, minor, major, critical, blocker
Repository repository.Repository `json:"repository" mapstructure:"repository"`
Reporter user.User `json:"reporter" mapstructure:"reporter"`
Assignee user.User `json:"assignee" mapstructure:"assignee"`
Content common.RenderedText `json:"content" mapstructure:"content"`
Votes int `json:"votes" mapstructure:"votes"`
Watchers int `json:"watches" mapstructure:"watches"`
Milestone *common.Entity `json:"milestone" mapstructure:"milestone"`
Component *component.Component `json:"component" mapstructure:"component"`
Links common.Links `json:"links" mapstructure:"links"`
CreatedOn time.Time `json:"created_on" mapstructure:"created_on"`
UpdatedOn time.Time `json:"updated_on" mapstructure:"updated_on"`
EditedOn time.Time `json:"edited_on" mapstructure:"edited_on"`
}
func (Issue) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
type IssueChange ¶
type IssueChange struct {
Type string `json:"type" mapstructure:"type"`
ID int `json:"id" mapstructure:"id"`
Name string `json:"name" mapstructure:"name"`
Issue Issue `json:"issue" mapstructure:"issue"`
User user.User `json:"user" mapstructure:"user"`
Changes ChangeSet `json:"changes" mapstructure:"changes"`
Message common.RenderedText `json:"message" mapstructure:"message"`
CreatedOn time.Time `json:"created_on" mapstructure:"created_on"`
Links common.Links `json:"links" mapstructure:"links"`
}
func (IssueChange) GetHeader ¶
func (issueChange IssueChange) GetHeader(short bool) []string
GetHeader gets the header for a table
implements common.Tableable
func (IssueChange) GetRow ¶
func (issueChange IssueChange) GetRow(headers []string) []string
GetRow gets the row for a table
implements common.Tableable
func (IssueChange) MarshalJSON ¶
func (change IssueChange) MarshalJSON() (data []byte, err error)
MarshalJSON implements the json.Marshaler interface.
type IssueChanges ¶
type IssueChanges []IssueChange
func GetIssueChanges ¶ added in v0.11.0
func GetIssueChanges(context context.Context, cmd *cobra.Command, issueID string) (changes IssueChanges, err error)
GetIssueChanges gets the changes for an issue
func (IssueChanges) GetHeader ¶
func (issueChanges IssueChanges) GetHeader() []string
GetHeader gets the headers for the list command
implements common.Tableables
func (IssueChanges) GetRowAt ¶
func (issueChanges IssueChanges) GetRowAt(index int, headers []string) []string
GetRowAt gets the row for the list command
implements common.Tableables
func (IssueChanges) Size ¶
func (issueChanges IssueChanges) Size() int
Size gets the number of elements
implements common.Tableables
type IssueCreator ¶
type IssueUpdator ¶
type IssueUpdator struct {
Title string `json:"title,omitempty"`
Kind string `json:"kind,omitempty"` // bug, enhancement, proposal, task
Priority string `json:"priority,omitempty"` // trivial, minor, major, critical, blocker
Content *common.RenderedText `json:"content,omitempty"`
Assignee *user.User `json:"assignee,omitempty"`
Version *common.Entity `json:"version,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.