Beispiel #1
0
func writePullRequestTitleAndBody(base, head, fullBase, fullHead string, commits []string) (title, body string, err error) {
	message, err := pullRequestChangesMessage(base, head, fullBase, fullHead, commits)
	if err != nil {
		return
	}

	editor, err := github.NewEditor("PULLREQ", message)
	if err != nil {
		return
	}

	return editor.EditTitleAndBody()
}
Beispiel #2
0
func writeReleaseTitleAndBody(project *github.Project, tag, currentBranch string) (string, string, error) {
	message := `
# Creating release %s for %s from %s
#
# Write a message for this release. The first block
# of the text is the title and the rest is description.
`
	message = fmt.Sprintf(message, tag, project.Name, currentBranch)

	editor, err := github.NewEditor("RELEASE", message)
	if err != nil {
		return "", "", err
	}

	return editor.EditTitleAndBody()
}
Beispiel #3
0
func writeIssueTitleAndBody(project *github.Project) (string, string, error) {
	message := `
# Creating issue for %s.
#
# Write a message for this issue. The first block
# of the text is the title and the rest is description.
`
	message = fmt.Sprintf(message, project.Name)

	editor, err := github.NewEditor("ISSUE", message)
	if err != nil {
		return "", "", err
	}

	return editor.EditTitleAndBody()
}