package
0.0.1290
Repository: https://github.com/jenkins-x/lighthouse-client.git
Documentation: pkg.go.dev

# Functions

AddAuthToSCMClient configures an existing go-scm client with transport and authorization using the given token, depending on whether the token is a GitHub App token.
BlobURLForProvider gets the link to the blob for an individual file in a commit or branch.
CallExternalPluginsWithActivityRecord dispatches the provided activity record to the external plugins.
CallExternalPluginsWithWebhook dispatches the provided webhook to the external plugins.
CreateHMACHeader creates the hmac token.
DirExists checks if path exists and is a directory.
ErrorToMarkdown converts an error to markdown text so we can include it on a Pull Request comment.
ExternalPluginsForEvent returns whether there are any external plugins that need to get the present event.
FileExists checks if path exists and is a file.
GetBotName returns the bot name from the environment.
GetGitHubAppAPIUser returns the username to be used for GitHub API calls with the GitHub App, if so configured.
GetGitHubAppSecretDir returns the location of the GitHub App secrets dir, if defined, and an empty string otherwise.
GetGitServer returns the git server base URL from the environment.
GetSCMClient gets the Lighthouse SCM client, go-scm client, server URL, and token for the current user and server.
GetSCMToken gets the SCM secret from the environment.
GitKind gets the git kind from the environment.
HMACToken gets the HMAC token from the environment or filesystem.
NewOwnerTokensDir creates a new dir token scanner.
ParseExternalPluginEvent parses a webhook relayed to an external plugin.
Stopper returns a channel that remains open until an interrupt is received.
StringArrayIndex returns the index in the slice which equals the given value.
ToValidName converts the given string into a valid Kubernetes resource name.
ToValidNameTruncated converts the given string into a valid Kubernetes resource name, truncating the result if it is more than maxLength characters.
URLJoin joins the given paths so that there is only ever one '/' character between the paths.

# Constants

BaseSHALabel is added in resources created by Lighthouse and contains the base SHA (for PRs) to be merged against..
BranchLabel is added in resources created by Lighthouse and contains the branch name for the job.
BuildNumLabel is added in resources created by Lighthouse and contains the build number for the job.
CloneURIAnnotation is added in resources created by Lighthouse and contains the clone URI for the git repo.
CommitStatusPendingDescription is the description used for PR commit status for pipelines we have just kicked off.
ContextLabel is added in resources created by Lighthouse and contains the job context.
GitHubAppAPIUserFilename is the filename inside the GitHub App secrets dir which will contain the user we will use for GitHub API calls when present.
GitHubAppGitRemoteUsername Username for git https URLs when using a GitHub App token.
#nosec.
GithubServer the default github server URL.
LastCommitSHALabel is added in resources created by Lighthouse and contains the SHA being built.
LighthouseCommandPrefix is an optional prefix for commands to deal with things like GitLab hijacking /approve.
LighthouseJobAnnotation is added in resources created by lighthouse and carries the name of the job that the pod is running.
LighthousePayloadTypeActivity is the activity type.
LighthousePayloadTypeHeader is the header key displaying what type of payload this is, either "webhook" or "activity".
LighthousePayloadTypeWebhook is the webhook type.
LighthousePipelineActivityNameLabel is added to the LighthouseJob with the name of the PipelineActivity corresponding to it.
LighthouseSignatureHeader is the header key used for the signature when relaying to external plugins.
LighthouseUserAgent is the header value for User-Agent when Lighthouse calls external plugins.
LighthouseWebhookKindHeader is the header key used for the webhook kind when relaying to external plugins.
OrgLabel is added in resources created by Lighthouse and carries the org associated with the job, eg kubernetes-sigs.
OverriddenByPrefix is the beginning of the description for commit statuses set by /override.
ProwConfigFilename config file name.
ProwConfigMapName name of the ConfgMap holding the config.
ProwPluginsConfigMapName name of the ConfigMap holding the plugins config.
ProwPluginsFilename plugins file name.
PullLabel is added in resources created by Lighthouse and carries the PR number associated with the job, eg 321.
RepoLabel is added in resources created by Lighthouse and carries the repo associated with the job, eg test-infra.

# Structs

OwnerTokensDir handles finding owner based tokens in a directory for GitHub Apps.