Skip to content

Commit

Permalink
Use FindGbReleasePr to update GBM release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
derekblank committed Nov 1, 2023
1 parent 0073331 commit 0c9cf5d
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions cli/pkg/release/gbm.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,17 @@ func getChangeLog(dir string, gbmPr *gh.PullRequest) ([]byte, error) {
cl := []byte{}

if dir == "" {
console.Warn("not implemented")
return cl, nil
gbPr, _ := FindGbReleasePr(gbmPr.ReleaseVersion)

// TODO: find the best way to get the gbPr
org := repo.GetOrg("gutenberg")
endpoint := fmt.Sprintf("https://raw.githubusercontent.com/%s/gutenberg/%s/packages/react-native-editor/CHANGELOG.md", org, gbPr.Head.Sha)

// org, _ := repo.GetOrg("gutenberg")
// endpoint := fmt.Sprintf("https://raw.githubusercontent.com/%s/gutenberg/%s/packages/react-native-editor/CHANGELOG.md", org, gbPr.Head.Sha)

// if resp, err := http.Get(endpoint); err != nil {
// fmt.Errorf("unable to get the changelog (err %s)", err)
// } else {
// defer resp.Body.Close()
// buff = resp.Body
// }
if resp, err := http.Get(endpoint); err != nil {
return cl, fmt.Errorf("unable to get the changelog (err %s)", err)
} else {
defer resp.Body.Close()
buff = resp.Body
}

} else {
// Read in the change log
Expand Down

0 comments on commit 0c9cf5d

Please sign in to comment.