matsuri

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TokenName is the environment variable name for the GitHub token.
	TokenName = "MATSURI_TOKEN" // #nosec

)

Variables

This section is empty.

Functions

func CreateFixPRForIssueNumber

func CreateFixPRForIssueNumber(issueNum int, noclose bool) (pr *github.PullRequest, err error)

CreateFixPRForIssueNumber creates a fix PR for the provided issue.

func CreatePRForIssueNumber

func CreatePRForIssueNumber(issueNum int, noclose bool) (pr *github.PullRequest, err error)

CreatePRForIssueNumber creates a new PR for the given issue and returns the created card.

func GetClient

func GetClient() (client *github.Client)

GetClient retrieves a client from a context with value.

func GetDefaultBranch

func GetDefaultBranch() (branch *string, err error)

GetDefaultBranch gets the name of the default branch for the repo.

func GetInProgressIssues added in v1.2.1

func GetInProgressIssues() (issues []*github.Issue, err error)

GetOpenIssuesForProject retrieves in-progress Issues for a Project.

func GetIssueNumberFromCard

func GetIssueNumberFromCard(c *github.ProjectCard) (id int)

GetIssueNumberFromCard gets the Issue number from a Card.

func GetIssueNumbersStartingWith added in v1.2.1

func GetIssueNumbersStartingWith(issues []*github.Issue, toComplete string) (issueNumbers []string)

GetIssueNumbersStartingWith retrieves issue numbers starting with the given prefix.

func GetLatestVersion

func GetLatestVersion() (v *version.Version, err error)

GetLatestVersion gets the release tag of the latest release version of git-matsuri.

func GetMatsuriEmail

func GetMatsuriEmail() (email string, err error)

GetMatsuriEmail gets the festivaljapon.com email of the current user, if available.

func GetOpenIssues added in v1.2.1

func GetOpenIssues(repoOnly bool) ([]*github.Issue, error)

GetIssues gets issues that need to be worked on.

func GetOpenIssuesForProject added in v1.2.1

func GetOpenIssuesForProject() (issues []*github.Issue, err error)

GetOpenIssuesForProject retrieves Issues for a Project.

func GetProject added in v1.2.0

func GetProject() (project *github.Project, err error)

GetProject retrieves the oldest matching open project.

func GetProjectCardInColumn

func GetProjectCardInColumn(column *github.ProjectColumn, issueNumber int) *github.ProjectCard

GetProjectCardInColumn gets the project card associated with the given issue number.

func GetProjectColumnByName

func GetProjectColumnByName(project *github.Project, columnName string) (column *github.ProjectColumn, err error)

GetProjectColumnByName gets the column by its name.

func GetRepoIssues

func GetRepoIssues() (issues []*github.Issue, err error)

GetRepoIssues gets the issues for the current repository, regardless if they belong to a project or not.

func GetRepoName

func GetRepoName() (repo string, err error)

GetRepoName gets the repository name from the current directory.

func GetRepoNameFromURL added in v1.1.0

func GetRepoNameFromURL(url string) (repoName string)

GetRepoNameFromURL gets the Repository name from a URL.

func GetRepoURL

func GetRepoURL(name string, http bool) (url string, err error)

GetRepoURL verifies that the given repository name matches a MatsuriJapon repository and returns its url.

func IsExistingIssue

func IsExistingIssue(num int) bool

IsExistingIssue verifies that the Issue exists and is not a pull request.

func IsValidIssue

func IsValidIssue(num int) bool

IsValidIssue verifies that an open Issue with the given number exists.

func MoveProjectCardForProject

func MoveProjectCardForProject(num int) (err error)

MoveProjectCardForProject moves the Issue to the Doing project column.

func PrintIssues

func PrintIssues(issues []*github.Issue)

PrintIssues prints issues.

func PrintProjectKanban

func PrintProjectKanban(project *github.Project)

PrintProjectKanban prints the project kanban.

func ReopenIssue

func ReopenIssue(issueNum int) (err error)

ReopenIssue reopens a closed Issue.

Types

type IssueGetterFunc added in v1.2.1

type IssueGetterFunc func() (issues []*github.Issue, err error)

Jump to

Keyboard shortcuts

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