pullrequest

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:     "pullrequest",
	Aliases: []string{"pr", "pull-request"},
	Short:   "Manage pull requests",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Pullrequest 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 Branch

type Branch struct {
	Name                 string   `json:"name"                             mapstructure:"name"`
	MergeStrategies      []string `json:"merge_strategies,omitempty"       mapstructure:"merge_strategies"`
	DefaultMergeStrategy string   `json:"default_merge_strategy,omitempty" mapstructure:"default_merge_strategy"`
}

type Endpoint

type Endpoint struct {
	Branch     Branch                 `json:"branch"               mapstructure:"branch"`
	Commit     *commit.Commit         `json:"commit,omitempty"     mapstructure:"commit"`
	Repository *repository.Repository `json:"repository,omitempty" mapstructure:"repository"`
}

type PullRequest

type PullRequest struct {
	Type              string             `json:"type"                   mapstructure:"type"`
	ID                uint64             `json:"id"                     mapstructure:"id"`
	Title             string             `json:"title"                  mapstructure:"title"`
	Description       string             `json:"description"            mapstructure:"description"`
	Summary           PullRequestSummary `json:"summary"                mapstructure:"summary"`
	State             string             `json:"state"                  mapstructure:"state"`
	MergeCommit       *commit.Commit     `json:"merge_commit,omitempty" mapstructure:"merge_commit"`
	CloseSourceBranch bool               `json:"close_source_branch"    mapstructure:"close_source_branch"`
	ClosedBy          user.User          `json:"closed_by"              mapstructure:"closed_by"`
	Author            common.AppUser     `json:"author"                 mapstructure:"author"`
	Reason            string             `json:"reason"                 mapstructure:"reason"`
	Destination       Endpoint           `json:"destination"            mapstructure:"destination"`
	Source            Endpoint           `json:"source"                 mapstructure:"source"`
	Links             link.Links         `json:"links"                  mapstructure:"links"`
	CommentCount      uint64             `json:"comment_count"          mapstructure:"comment_count"`
	TaskCount         uint64             `json:"task_count"             mapstructure:"task_count"`
	CreatedOn         time.Time          `json:"created_on"             mapstructure:"created_on"`
	UpdatedOn         time.Time          `json:"updated_on"             mapstructure:"updated_on"`
}

func (PullRequest) MarshalJSON

func (pullrequest PullRequest) MarshalJSON() (data []byte, err error)

MarshalJSON implements the json.Marshaler interface.

func (PullRequest) String

func (pullrequest PullRequest) String() string

String gets a string representation of this pullrequest

implements fmt.Stringer

func (*PullRequest) Validate

func (pullrequest *PullRequest) Validate() error

Validate validates a PullRequest

type PullRequestCreator

type PullRequestCreator struct {
	Title             string     `json:"title"`
	Description       string     `json:"description,omitempty"`
	Source            Endpoint   `json:"source"`
	Destination       *Endpoint  `json:"destination,omitempty"`
	Reviewers         []Reviewer `json:"reviewers,omitempty"`
	CloseSourceBranch bool       `json:"close_source_branch,omitempty"`
}

type PullRequestSummary

type PullRequestSummary struct {
	Type   string `json:"type"   mapstructure:"type"`
	Markup string `json:"markup" mapstructure:"markup"`
	Raw    string `json:"raw"    mapstructure:"raw"`
	HTML   string `json:"html"   mapstructure:"html"`
}

type Reviewer

type Reviewer struct {
	ID string `json:"uuid" mapstructure:"uuid"`
}

Jump to

Keyboard shortcuts

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