Skip to content

Commit 1d97ae3

Browse files
committed
hack/release-notes: add repo flag
Signed-off-by: Stefan Büringer [email protected]
1 parent 0cbde4a commit 1d97ae3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hack/tools/release/notes.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ var (
6363
unknown,
6464
}
6565

66+
repo = flag.String("repo", "kubernetes-sigs/cluster-api", "The tag or commit to start from.")
67+
6668
fromTag = flag.String("from", "", "The tag or commit to start from.")
6769

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

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

159161
out, err := cmd.CombinedOutput()
160162
if err != nil {

0 commit comments

Comments
 (0)