commit

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "commit",
	Short: "Manage commits",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Commit requires a subcommand:")
		for _, command := range cmd.Commands() {
			fmt.Println(command.Name())
		}
	},
}

Command represents this folder's command

Functions

This section is empty.

Types

type Commit

type Commit struct {
	Type       string                `json:"type"               mapstructure:"type"`
	Hash       string                `json:"hash"               mapstructure:"hash"`
	Author     user.Author           `json:"author"             mapstructure:"author"`
	Message    string                `json:"message"            mapstructure:"message"`
	Summary    *common.RenderedText  `json:"summary,omitempty"  mapstructure:"summary"`
	Rendered   *RenderedMessage      `json:"rendered,omitempty" mapstructure:"rendered"`
	Parents    []CommitRef           `json:"parents"            mapstructure:"parents"`
	Date       time.Time             `json:"date"               mapstructure:"date"`
	Repository repository.Repository `json:"repository"         mapstructure:"repository"`
	Links      common.Links          `json:"links"              mapstructure:"links"`
}

func (Commit) GetHeader added in v0.4.0

func (commit Commit) GetHeader(short bool) []string

GetHeader gets the header for a table

implements common.Tableable

func (Commit) GetRow added in v0.4.0

func (commit Commit) GetRow(headers []string) []string

GetRow gets the row for a table

implements common.Tableable

func (Commit) MarshalJSON

func (commit Commit) MarshalJSON() (data []byte, err error)

MarshalJSON implements the json.Marshaler interface.

func (Commit) String

func (commit Commit) String() string

String gets a string representation of this pullrequest

implements fmt.Stringer

func (*Commit) Validate

func (commit *Commit) Validate() error

Validate validates a Commit

type CommitRef

type CommitRef struct {
	Type  string       `json:"type"  mapstructure:"type"`
	Hash  string       `json:"hash"  mapstructure:"hash"`
	Links common.Links `json:"links" mapstructure:"links"`
}

type Commits added in v0.4.0

type Commits []Commit

func (Commits) GetHeader added in v0.4.0

func (commits Commits) GetHeader() []string

GetHeader gets the header for a table

implements common.Tableables

func (Commits) GetRowAt added in v0.4.0

func (commits Commits) GetRowAt(index int, headers []string) []string

GetRowAt gets the row for a table

implements common.Tableables

func (Commits) Size added in v0.4.0

func (commits Commits) Size() int

Size gets the number of elements

implements common.Tableables

type RenderedMessage

type RenderedMessage struct {
	Message common.RenderedText `json:"message" mapstructure:"message"`
}

Jump to

Keyboard shortcuts

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