Documentation
¶
Index ¶
- Constants
- Variables
- func ActiveVersionsOnBranch(ghClient *github.Client, jiraClient *jira.Client, branchName string, ...) ([]semver.Version, error)
- func BranchHasVersionsGT(client *github.Client, jiraClient *jira.Client, branchName string, ...) (bool, error)
- func CreateBranch(ghClient *github.Client, branchName string, SHA string) error
- func CreateFileUpdateCommit(ghClient *github.Client, branchName string, path string, contents string, ...) (string, error)
- func CreatePR(ghClient *github.Client, prName, branchName, baseBranch, body string) (*github.PullRequest, error)
- func ExtractJiraIssueID(pr *github.PullRequest) (string, error)
- func FetchCommitsByRef(ghClient *github.Client, ref string, ...) ([]*github.RepositoryCommit, error)
- func FetchCommitsByShaRange(ghClient *github.Client, startSha string, stopSha string) ([]*github.RepositoryCommit, error)
- func FetchJiraIDsInCommits(commits []*github.RepositoryCommit) []string
- func FetchJiraIssue(jiraClient *jira.Client, jiraIssueID string) (*jira.Issue, error)
- func FetchPR(ghClient *github.Client, number int) (*github.PullRequest, error)
- func FetchPRByTitle(ghClient *github.Client, title string) (*github.PullRequest, error)
- func FetchPRs(ghClient *github.Client, cutoff time.Time, opts *github.PullRequestListOptions) ([]*github.PullRequest, error)
- func FetchVersionPR(ghClient *github.Client, assert Assertion, versionToCompare semver.Version) (*github.PullRequest, error)
- func FetchVersionPRs(ghClient *github.Client, assert Assertion, versionToCompare semver.Version, ...) ([]*github.PullRequest, error)
- func GetCommitsBehind(client *github.Client, base, head string) ([]*github.RepositoryCommit, error)
- func InitGHClient() *github.Client
- func InitJiraClient() (*jira.Client, error)
- func IsMergedStatus(status string) bool
- func IsVersionBranch(branchName string) bool
- func JqlUnpaged(client *jira.Client, jql string) ([]jira.Issue, error)
- func LabelPR(ghClient *github.Client, prnumber int, labels []string) error
- func NewRateLimitTransport(rt http.RoundTripper, accessToken string) *rateLimitTransport
- func ParseJiraKey(v string) (string, error)
- func ParseJiraVersion(version string) (semver.Version, error)
- func ParseJiraVersionRaw(version string) string
- func SearchGithubIssues(client *github.Client, term string) ([]*github.Issue, error)
- func SetPRBody(client *github.Client, prnumber int, body string) error
- func UpdateJiraFixVersion(client *jira.Client, issue *jira.Issue, versionID string) error
- func UpdateJiraStatus(client *jira.Client, issue *jira.Issue, statusName string) error
- func UpdatePRTargetBranch(client *github.Client, prnumber int, targetBranch string) error
- func ValidVersionBranch(branchName string, version semver.Version) error
- func VersionFromPRTitle(title string) (semver.Version, error)
- func VersionedBranchName(version semver.Version) string
- func VersionedPRTitle(version semver.Version) string
- type Assertion
- type Version
Constants ¶
View Source
const ( MasterBranch = "master" StagingBranch = "beta" ReleaseBranch = "release" )
View Source
const JiraStatusInProgress = "In Progress"
View Source
const JiraStatusPending = "Pending"
View Source
const JiraStatusTodo = "To Do"
View Source
const UpdateVersionCommitMessage = "Update version.txt"
View Source
const VersionNextFeasible = "Next Feasible"
View Source
const VersionNextUnscheduled = "Next Unscheduled"
View Source
const VersionedPRPrefix = "Version "
Variables ¶
View Source
var VersionMaster = semver.MustParse("0.0.0")
Functions ¶
func ActiveVersionsOnBranch ¶
func BranchHasVersionsGT ¶
func CreateFileUpdateCommit ¶
func ExtractJiraIssueID ¶
func ExtractJiraIssueID(pr *github.PullRequest) (string, error)
ExtractJiraIssueID tries to extract the jira issue ID from the branch name
func FetchCommitsByRef ¶
func FetchCommitsByRef(ghClient *github.Client, ref string, stop func(commit *github.RepositoryCommit) bool) ([]*github.RepositoryCommit, error)
func FetchCommitsByShaRange ¶
func FetchJiraIDsInCommits ¶
func FetchJiraIDsInCommits(commits []*github.RepositoryCommit) []string
func FetchJiraIssue ¶
func FetchPRByTitle ¶
func FetchPRs ¶
func FetchPRs(ghClient *github.Client, cutoff time.Time, opts *github.PullRequestListOptions) ([]*github.PullRequest, error)
FetchPRs fetches all PRs and iterates over all available pages
func FetchVersionPR ¶
func FetchVersionPRs ¶
func GetCommitsBehind ¶
func InitGHClient ¶
func InitJiraClient ¶
func InitJiraClient() (*jira.Client, error)
func IsMergedStatus ¶
func IsVersionBranch ¶
func JqlUnpaged ¶
func NewRateLimitTransport ¶
func NewRateLimitTransport(rt http.RoundTripper, accessToken string) *rateLimitTransport
func ParseJiraKey ¶
func ParseJiraVersionRaw ¶
func SearchGithubIssues ¶
func UpdateJiraFixVersion ¶
func UpdateJiraStatus ¶
func UpdatePRTargetBranch ¶
func VersionedBranchName ¶
func VersionedPRTitle ¶
Types ¶
type Assertion ¶
type Assertion string
const ( AssertLT Assertion = "less than" AssertGT = "greater than" )
Click to show internal directories.
Click to hide internal directories.