Documentation
¶
Index ¶
- Variables
- func GetPullRequestCommentIDs(context context.Context, cmd *cobra.Command, args []string, toComplete string) (ids []string, err error)
- type Comment
- type CommentCreator
- type CommentUpdator
- type Comments
- type ContentCreator
- type ContentUpdator
- type ParentReference
- type PullRequestReference
- type Resolution
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "comment", Short: "Manage comments", Run: func(cmd *cobra.Command, args []string) { fmt.Println("Comment requires a subcommand:") for _, command := range cmd.Commands() { fmt.Println(command.Name()) } }, }
Command represents this folder's command
Functions ¶
Types ¶
type Comment ¶
type Comment struct {
Type string `json:"type" mapstructure:"type"`
ID int `json:"id" mapstructure:"id"`
Content common.RenderedText `json:"content" mapstructure:"content"`
User user.User `json:"user" mapstructure:"user"`
Anchor *common.FileAnchor `json:"inline,omitempty" mapstructure:"inline"`
Parent *Comment `json:"parent,omitempty" mapstructure:"parent"`
CreatedOn time.Time `json:"created_on" mapstructure:"created_on"`
UpdatedOn time.Time `json:"updated_on" mapstructure:"updated_on"`
IsDeleted bool `json:"deleted" mapstructure:"deleted"`
IsPending bool `json:"pending" mapstructure:"pending"`
Resolution *Resolution `json:"resolution,omitempty" mapstructure:"resolution"`
PullRequest *PullRequestReference `json:"pullrequest" mapstructure:"pullrequest"`
Links common.Links `json:"links" mapstructure:"links"`
}
func (Comment) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
type CommentCreator ¶
type CommentCreator struct {
Content ContentCreator `json:"content" mapstructure:"content"`
Anchor *common.FileAnchor `json:"inline,omitempty" mapstructure:"inline"`
Parent *ParentReference `json:"parent,omitempty" mapstructure:"parent"`
}
type CommentUpdator ¶
type CommentUpdator struct {
Content ContentUpdator `json:"content" mapstructure:"content"`
Anchor *common.FileAnchor `json:"inline,omitempty" mapstructure:"inline"`
Parent *ParentReference `json:"parent,omitempty" mapstructure:"parent"`
}
type Comments ¶
type Comments []Comment
func (Comments) GetHeaders ¶
GetHeaders gets the headers for the list command
implements common.Tableables
type ContentCreator ¶
type ContentCreator struct {
Raw string `json:"raw" mapstructure:"raw"`
}
type ContentUpdator ¶
type ContentUpdator struct {
Raw string `json:"raw" mapstructure:"raw"`
}
type ParentReference ¶
type ParentReference struct {
ID int64 `json:"id" mapstructure:"id"`
}
type PullRequestReference ¶
type Resolution ¶
type Resolution struct {
Type string `json:"type" mapstructure:"type"`
User user.User `json:"user" mapstructure:"user"`
CreatedOn time.Time `json:"created_on" mapstructure:"created_on"`
}
func (Resolution) MarshalJSON ¶
func (resolution Resolution) MarshalJSON() (data []byte, err error)
MarshalJSON implements the json.Marshaler interface.
Click to show internal directories.
Click to hide internal directories.