pre

package
v0.0.0-...-e8d3a6b Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []string, e string) bool

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

func ConvertPRNumToString(prNum int) string

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

func RetrieveMergeCommits() ([]string, error)

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

func SortPRType(prType string, pr PR)

SortPRType sorts the pull requets into the correct categories depending on whether they are bugs, new features, or improvements

Types

type BugFix

type BugFix struct {
	PRs []PR
}

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
}

type PR

type PR struct {
	Number string
	Name   string
	URL    string
}

Jump to

Keyboard shortcuts

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