config

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 7 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(paths []string) (bool, error)

Load initializes the configuration values. It may optionally be called with a list of additional paths to check for the config file. Returns a boolean indicating whether or not a config file was loaded and an error if one occurred.

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
}

Jump to

Keyboard shortcuts

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