Skip to content

Commit 370b915

Browse files
committed
Rename variable and docs
1 parent e722dcc commit 370b915

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ghrn/ghrn.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ type Config struct {
2626
StopAt int
2727
// IncludeCommits will include commmits messages for each PR.
2828
IncludeCommits bool
29-
// StopAtLatestRelease will stop at latest release commit.
30-
StopAtLatestRelease bool
29+
// SinceLatestRelease will only include PRs and commits merged since the latest release tag.
30+
SinceLatestRelease bool
3131
}
3232

3333
// BuildReleaseNotes lists GitHub Pull Requests and writes formatted release notes
@@ -101,7 +101,7 @@ func BuildReleaseNotes(ctx context.Context, w io.Writer, conf Config) error {
101101
prCommits = append(prCommits, commit.GetCommit().GetTree().GetSHA())
102102
}
103103

104-
if conf.StopAtLatestRelease && !any(prCommits, newCommits) {
104+
if conf.SinceLatestRelease && !any(prCommits, newCommits) {
105105
// stop any new commits do not contains pr commits
106106
return nil
107107
}

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func main() {
1616
flag.StringVar(&conf.Repo, "repo", conf.Repo, "Repo. (Required)")
1717
flag.IntVar(&conf.StopAt, "stop-at", conf.StopAt, "PR number to stop at")
1818
flag.BoolVar(&conf.IncludeCommits, "include-commits", conf.IncludeCommits, "Include commit messages")
19-
flag.BoolVar(&conf.StopAtLatestRelease, "since-latest-release", conf.StopAtLatestRelease, "Stop at latest release's commit")
19+
flag.BoolVar(&conf.SinceLatestRelease, "since-latest-release", conf.SinceLatestRelease, "Stop at latest release's commit")
2020
flag.Parse()
2121

2222
if conf.Org == "" {

0 commit comments

Comments
 (0)