config

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const VersionDev = "<dev>"

Variables

View Source
var Av = struct {
	PullRequest PullRequest
	GitHub      GitHub
	Aviator     Aviator
}{
	Aviator: Aviator{
		APIHost: "https://api.aviator.co",
	},
	PullRequest: PullRequest{
		OpenBrowser: true,
	},
	GitHub: GitHub{},
}
View Source
var Version = VersionDev

Version is the version of the av application. It is set automatically when creating release builds.

Functions

func FetchLatestVersion

func FetchLatestVersion() (string, error)

func Load

func Load(repoConfigDir string) error

Load initializes the configuration values.

This takes an optional repository config directory, which, when exists, overrides the default config.

Types

type Aviator added in v0.0.17

type Aviator struct {
	// The base URL of the Aviator API to use.
	// By default, this is https://aviator.co, but for on-prem installations
	// this can be changed (e.g., https://aviator.mycompany.com).
	// It should not include a trailing slash or any path components.
	APIHost string
	// The API token to use for authenticating to the Aviator API.
	APIToken string
}

type GitHub

type GitHub struct {
	// The GitHub API token to use for authenticating to the GitHub API.
	Token string
	// The base URL of the GitHub instance to use.
	// This should only be set for GitHub Enterprise Server (GHES) instances.
	// For example, "https://github.mycompany.com/" (without a "/api/v3" or
	// "/api/graphql" suffix).
	BaseURL string
}

type PullRequest added in v0.0.3

type PullRequest struct {
	Draft       bool
	OpenBrowser bool
	// If true, the pull request will be converted to a draft if the base branch
	// needs to be changed after the pull request has been changed. This avoids
	// accidentally adding lots of unnecessary auto-added reviewers (via GitHub's
	// CODEOWNERS feature) to the pull request while the PR is in a transient
	// state.
	// If not set, the value should be considered true iff there is a CODEOWNERS
	// file in the repository.
	RebaseWithDraft *bool

	// By default, when the pull request title contains "WIP", it automatically sets the PR as
	// a draft PR. Setting this to true suppresses this behavior.
	NoWIPDetection bool

	// Branch prefix to use for creating new branches.
	BranchNamePrefix string

	// If true, the CLI will automatically add/update a comment to all PRs linking other PRs in the stack.
	// False by default, since Aviator's MergeQueue also adds a similar comment.
	WriteStack bool
}

Jump to

Keyboard shortcuts

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