github

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Token        string
	Subject      string
	Repo         string
	RepoOwner    string
	CommitBranch string
	TargetBranch string
	Body         string
	Labels       []string
}

Config configures the GitHub provider with all necessary information.

type PrProvider

type PrProvider struct {
	// contains filtered or unexported fields
}

PrProvider contains the methods and data to interact with the GitHub API.

func NewProvider

func NewProvider(config *Config) *PrProvider

NewProvider returns a new GitHub provider instance.

func (*PrProvider) CreateOrUpdatePr

func (p *PrProvider) CreateOrUpdatePr() error

CreateOrUpdatePr creates the PR if it doesn't exist, or updates an existing one if the branch matches. A PR is considered out-of-date if the subject or body don't match with current configuration. Labels are left unmodified.

Jump to

Keyboard shortcuts

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