Documentation
¶
Index ¶
Constants ¶
View Source
const Type = "github"
Type should match the package name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// AccessToken is the API token used to authenticate with GitHub (required).
AccessToken string `json:"access_token"`
// RepositoryOwner is the account which owns the repository on GitHub (required).
// For https://github.com/octocat/kit, the owner is "octocat".
RepositoryOwner string `json:"repository_owner"`
// RepositoryName is the name of the repository on GitHub (required).
// For https://github.com/octocat/kit, the name is "kit".
RepositoryName string `json:"repository_name"`
// CommitterName is the display name of the user corresponding to the AccessToken (required).
// If the AccessToken is for user @octocat, then this might be "Mona Lisa," her name.
CommitterName string `json:"committer_name"`
// CommitterEmail is the email address of the user corresponding to the AccessToken (required).
// If the AccessToken is for user @octocat, then this might be "mona@github.com".
CommitterEmail string `json:"committer_email"`
// Branch is the git branch to store the files to (required).
Branch string `json:"branch"`
// Dir is the subdirectory in the Git tree in which to store the files (required).
// For example, to write to the directory "updates" in the Git repo, this should be "updates".
Dir string `json:"dir"`
// Check files older than CheckExpiry will be
// deleted on calls to Maintain(). If this is
// the zero value, no old check files will be
// deleted.
CheckExpiry time.Duration `json:"check_expiry,omitempty"`
// CommitMessageSuffix is a string appended to each commit message.
// It could contain something like "[ci skip]" to prevent commits
// from triggering automated CI/CD pipelines.
CommitMessageSuffix string `json:"commit_message_suffix"`
// contains filtered or unexported fields
}
Storage is a way to store checkup results in a GitHub repository.
func New ¶
func New(config json.RawMessage) (*Storage, error)
New creates a new Storage instance based on json config
Click to show internal directories.
Click to hide internal directories.