Skip to content

Commit

Permalink
Catches missed error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Mikusa <[email protected]>
  • Loading branch information
Daniel Mikusa committed Apr 14, 2022
1 parent 5b3160d commit f99be05
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions actions/draft-release/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func main() {
}
fmt.Println("owner:", owner, "repo:", repo, "releaseId:", releaseId)
fmt.Println("repoRelease:", repoRelease)
fmt.Println("body:", body)

if _, dryRun := inputs["dry_run"]; dryRun {
fmt.Println("Title:", name)
Expand All @@ -109,7 +108,7 @@ func main() {
}
gh := github.NewClient(c)

gh.Repositories.EditRelease(
rel, resp, err := gh.Repositories.EditRelease(
context.Background(),
owner,
repo,
Expand All @@ -118,5 +117,9 @@ func main() {
if err != nil {
panic(fmt.Errorf("unable to execute EditRelease %s/%s/%d with %q\n%w", owner, repo, releaseId, repoRelease, err))
}

fmt.Println("rel:", rel)
fmt.Println("resp:", resp)
fmt.Println("status:", resp.StatusCode)
}
}

0 comments on commit f99be05

Please sign in to comment.