commit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 11 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      link.Links            `json:"links"                  mapstructure:"links"`
}

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 link.Links `json:"links" mapstructure:"links"`
}

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