issue

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 18 Imported by: 0

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

func GetIssueIDs

func GetIssueIDs(context context.Context, cmd *cobra.Command) (ids []string)

GetIssueIDs gets the IDs of the issues

Types

type Change

type Change struct {
	Old string `json:"old" mapstructure:"old,omitempty"`
	New string `json:"new" mapstructure:"new"`
}

func (Change) String

func (change Change) String() string

String gets a string representation

implements fmt.Stringer

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"`
}

func (ChangeSet) String

func (changeSet ChangeSet) String() string

String gets a string representation

implements fmt.Stringer

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.Account          `json:"reporter"   mapstructure:"reporter"`
	Assignee   user.Account          `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) GetHeader

func (issue Issue) GetHeader(short bool) []string

GetHeader gets the header for a table

implements common.Tableable

func (Issue) GetRow

func (issue Issue) GetRow(headers []string) []string

GetRow gets the row for a table

implements common.Tableable

func (Issue) MarshalJSON

func (issue Issue) MarshalJSON() (data []byte, err error)

MarshalJSON implements the json.Marshaler interface.

func (Issue) String

func (issue Issue) String() string

String gets a string representation of this pullrequest

implements fmt.Stringer

func (*Issue) Validate

func (issue *Issue) Validate() error

Validate validates a Issue

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.Account        `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 IssueCreator struct {
	Title    string               `json:"title"`
	Kind     string               `json:"kind"`     // bug, enhancement, proposal, task
	Priority string               `json:"priority"` // trivial, minor, major, critical, blocker
	Content  *common.RenderedText `json:"content"`
	Assignee *user.Account        `json:"assignee,omitempty"`
}

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.Account        `json:"assignee,omitempty"`
	Version  *common.Entity       `json:"version,omitempty"`
}

type Issues

type Issues []Issue

func (Issues) GetHeader

func (issues Issues) GetHeader() []string

GetHeader gets the headers for the list command

implements common.Tableables

func (Issues) GetRowAt

func (issues Issues) GetRowAt(index int, headers []string) []string

GetRowAt gets the row for the list command

implements common.Tableables

func (Issues) Size

func (issues Issues) Size() int

Size gets the number of elements

implements common.Tableables

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL