Skip to content

Commit

Permalink
hack/release-notes: add repo flag
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Büringer buringerst@vmware.com
  • Loading branch information
sbueringer committed Jul 20, 2023
1 parent 0cbde4a commit 1d97ae3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hack/tools/release/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ var (
unknown,
}

repo = flag.String("repo", "kubernetes-sigs/cluster-api", "The tag or commit to start from.")

fromTag = flag.String("from", "", "The tag or commit to start from.")

since = flag.String("since", "", "Include commits starting from and including this date. Accepts format: YYYY-MM-DD")
Expand Down Expand Up @@ -154,7 +156,7 @@ func getAreaLabel(merge string) (string, error) {
// Get pr id from merge commit
prID := strings.Replace(strings.TrimSpace(strings.Split(merge, " ")[3]), "#", "", -1)

cmd := exec.Command("gh", "api", "repos/kubernetes-sigs/cluster-api/pulls/"+prID) //nolint:gosec
cmd := exec.Command("gh", "api", fmt.Sprintf("repos/%s/pulls/%s", *repo, prID)) //nolint:gosec

out, err := cmd.CombinedOutput()
if err != nil {
Expand Down

0 comments on commit 1d97ae3

Please sign in to comment.