Skip to content

Commit

Permalink
feat: add title
Browse files Browse the repository at this point in the history
  • Loading branch information
benjlevesque committed Jun 8, 2023
1 parent 57cf46b commit 0b518a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
)

var dryRun = flag.Bool("dryRun", false, "")
var title = flag.String("title", "", "the release title")

func main() {
flag.Parse()
Expand All @@ -33,7 +34,7 @@ func main() {
fmt.Printf("[Dry Run] creating release for %s\n", newTag)
return
}
release, err := gh.CreateRelease(newTag)
release, err := gh.CreateRelease(newTag, *title)
if err != nil {
fmt.Println(err)
return
Expand Down
4 changes: 2 additions & 2 deletions pkg/gh/gh.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ func GetLatestRelease() (string, error) {
return gh_exec_clean("api", "/repos/{owner}/{repo}/releases/latest", "--jq", ".tag_name")
}

func CreateRelease(tag string) (string, error) {
str, _, err := gh.Exec("release", "create", "--generate-notes", tag)
func CreateRelease(tag, title string) (string, error) {
str, _, err := gh.Exec("release", "create", "--generate-notes", "--title", title, tag)
return str.String(), err

}
Expand Down

0 comments on commit 0b518a8

Please sign in to comment.