Skip to content

Commit

Permalink
Rename variable from ID -> UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
dannymidnight committed Aug 28, 2024
1 parent a27c4b4 commit bd5cc5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/builds.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
)

type Build struct {
ID string `json:"id"`
UUID string `json:"uuid"`
}

// CancelBuild cancels a build with the given ID
func (c *Client) CancelBuild(ctx context.Context, id string) (*Build, *Response, error) {
u := fmt.Sprintf("builds/%s/cancel", railsPathEscape(id))
// CancelBuild cancels a build with the given UUID
func (c *Client) CancelBuild(ctx context.Context, uuid string) (*Build, *Response, error) {
u := fmt.Sprintf("builds/%s/cancel", railsPathEscape(uuid))

req, err := c.newRequest(ctx, "POST", u, nil)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion clicommand/build_cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func cancelBuild(ctx context.Context, cfg BuildCancelConfig, l logger.Logger) er
return err
}

l.Info("Successfully cancelled build %s", build.ID)
l.Info("Successfully cancelled build %s", build.UUID)
return nil
}); err != nil {
return fmt.Errorf("failed to cancel build: %w", err)
Expand Down

0 comments on commit bd5cc5b

Please sign in to comment.