Documentation ¶
Index ¶
- func Contains(s []string, e string) bool
- func ConvertPRNumToString(prNum int) string
- func CreateClient()
- func GetMergeCommitSHA(pr *github.PullRequest) (string, error)
- func GetPR(number int) (*github.PullRequest, error)
- func GetPRName(pr *github.PullRequest) (string, error)
- func GetPRNum(pr *github.PullRequest) (int, error)
- func GetPRType(pr *github.PullRequest) (string, error)
- func GetPRURL(pr *github.PullRequest) (string, error)
- func GetRepoName() string
- func RetrieveMergeCommits() ([]string, error)
- func RetrievePRs() ([]*github.PullRequest, error)
- func ServeTemplatePre(w http.ResponseWriter, r *http.Request)
- func SortPRType(prType string, pr PR)
- type BugFix
- type Improvement
- type Information
- type NewFeature
- type PR
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
Contains accepts an array of strings and checks if the passed string is contained with that array (this is for the merge commits)
func ConvertPRNumToString ¶
ConvertPRNumToString converts the PR number to a string for easier handling
func CreateClient ¶
func CreateClient()
CreateClient creates the GitHub client for the accessing of the GitHub APIs
func GetMergeCommitSHA ¶
func GetMergeCommitSHA(pr *github.PullRequest) (string, error)
GetMergeCommitSHA retrieves the merge commit SHA from the passed in pull request
func GetPR ¶
func GetPR(number int) (*github.PullRequest, error)
GetPR gets the specific PR object from the repository using GitHub API and returns the PR for further processing
func GetPRName ¶
func GetPRName(pr *github.PullRequest) (string, error)
GetPRName retrieves the PR title from the GitHub API returned PR object and returns it as a string
func GetPRNum ¶
func GetPRNum(pr *github.PullRequest) (int, error)
GetPRNum retrieves the pull request number from the PR object returned from GitHub API and returns it as an int
func GetPRType ¶
func GetPRType(pr *github.PullRequest) (string, error)
GetPRType retrieves the PR type(bug fix, improvement, new feature) from the body using a simple contains function. The PRs are then sorted later on.
func GetPRURL ¶
func GetPRURL(pr *github.PullRequest) (string, error)
GetPRURL returns the URL of the PR for the linking of the PR within the web-page
func GetRepoName ¶
func GetRepoName() string
GetRepoName retrieves the repo of the current folder by using git this saves passing the repo as a param to tool or hardcoding repo names
func RetrieveMergeCommits ¶
RetrieveMergeCommits gets all of the merge SHAs and stores them in a slice which is then returned for further processing
func RetrievePRs ¶
func RetrievePRs() ([]*github.PullRequest, error)
RetrievePRs does a full retrieve of all PRs from within the repostory and returns them as an array
func ServeTemplatePre ¶
func ServeTemplatePre(w http.ResponseWriter, r *http.Request)
ServeTemplatePre populates the pre release data to the template for the main server to use and server
func SortPRType ¶
SortPRType sorts the pull requets into the correct categories depending on whether they are bugs, new features, or improvements
Types ¶
type Improvement ¶
type Improvement struct {
PRs []PR
}
type Information ¶
type Information struct { Populated bool Improvement Improvement BugFix BugFix NewFeature NewFeature }
type NewFeature ¶
type NewFeature struct {
PRs []PR
}