Skip to content

Commit

Permalink
Update gbm prepare command to use dir for changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
derekblank committed Nov 2, 2023
1 parent 0c9cf5d commit 1b82d1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/pkg/release/gbm.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func CreateGbmPR(version, dir string) (gh.PullRequest, error) {
if err := utils.SetupNode(dir); err != nil {
return pr, fmt.Errorf("error setting up Node environment: %v", err)
}

// Run npm ci and npm run bundle
if err := npm.Ci(); err != nil {
return pr, fmt.Errorf("error running npm ci: %v", err)
Expand Down Expand Up @@ -122,7 +123,7 @@ func CreateGbmPR(version, dir string) (gh.PullRequest, error) {
pr.Base.Ref = "trunk"
pr.Head.Ref = branch

if err := renderGbmPrBody(version, &pr); err != nil {
if err := renderGbmPrBody(dir, version, &pr); err != nil {
console.Info("Unable to render the GB PR body (err %s)", err)
}

Expand Down Expand Up @@ -160,9 +161,8 @@ func CreateGbmPR(version, dir string) (gh.PullRequest, error) {
return pr, nil
}

func renderGbmPrBody(version string, pr *gh.PullRequest) error {
// TODO - replace "" with dir variable
cl, err := getChangeLog("", pr)
func renderGbmPrBody(dir string, version string, pr *gh.PullRequest) error {
cl, err := getChangeLog(dir, pr)
if err != nil {
console.Warn(err.Error())
}
Expand Down

0 comments on commit 1b82d1f

Please sign in to comment.