prlifecycle

package
v8.175.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package prlifecycle opens, readies, closes and reverts pull requests through GitHub.

Index

Constants

View Source
const (
	Open   = "pr open"
	Ready  = "pr ready"
	Close  = "pr close"
	Revert = "pr revert"
)
View Source
const (
	VerdictOpened   agentcli.Verdict = "opened"
	VerdictReady    agentcli.Verdict = "ready"
	VerdictClosed   agentcli.Verdict = "closed"
	VerdictConflict agentcli.Verdict = "conflict"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFor

type ClientFor func(ctx context.Context, owner string, warn func(string)) (*githubclient.Client, string, error)

ClientFor supplies the caller's client and identity after the arguments are checked.

type Document

type Document struct {
	agentcli.Envelope
	Repository  string       `json:"repository"`
	Identity    string       `json:"identity,omitempty"`
	PullRequest *PullRequest `json:"pullRequest,omitempty"`
	// Conflict is set for pr revert's opened, listed and conflict only.
	Conflict *bool `json:"conflict,omitempty"`
}

type PullRequest

type PullRequest struct {
	Number  int    `json:"number"`
	URL     string `json:"url"`
	HeadSHA string `json:"headSha"`
	Draft   *bool  `json:"draft,omitempty"`
	State   string `json:"state,omitempty"`
}

type Request

type Request struct {
	Command, Repository                      string
	Branch, Issue, Assignee, Comment, Commit string
	Number                                   int
	Draft, KeepBranch                        bool
}

Request holds the arguments shared by the command and its tool. Draft and KeepBranch take their defaults (true) from the command or tool schema.

func (Request) Document

func (q Request) Document() Document

func (Request) Run

func (q Request) Run(ctx context.Context, doc *Document, clientFor ClientFor) error

Jump to

Keyboard shortcuts

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