Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRepoCreationYear ¶
GetRepoCreationYear takes in a repo and uses the GitHub API to determine the year it was created.
This is typically used to infer when the original copyright date is, but it should be noted that certain circumstances can cause the value returned may be unsuitable for use as the original copyright date. Specifically, it is possible for an older project to be recreated in a newer repo, or for the repo to be made public at a later date, at which point the year of creation and year of copyright may differ.
Types ¶
type GHClient ¶
type GHClient struct {
// contains filtered or unexported fields
}
GHClient is a wrapper to access Github Client's API endpoints easily
func NewGHClient ¶
func NewGHClient() *GHClient
NewGHClient uses the copyright Github App for client requests
type GHClientConfig ¶
type GHClientConfig struct {
// contains filtered or unexported fields
}
GHClientConfig is the configuration portion of the GH client (mostly for GH App)
type GHRepo ¶
GHRepo is a repo
func DiscoverRepo ¶
DiscoverRepo attempts to find if the current directory is related to a GitHub repo and, if so, what the organization name and repo name are
This function will return an error if more than one GitHub repos are associated with the given folder. This can happen if multiple git upstreams defined.