예제 #1
0
파일: pull_request.go 프로젝트: proch04/gh
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()
}
예제 #2
0
파일: release.go 프로젝트: jingweno/gh
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()
}
예제 #3
0
파일: issue.go 프로젝트: jingweno/gh
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()
}