Skip to content

refactor: use @heroku/sdk for container commands#3831

Draft
erika-wallace wants to merge 2 commits into
v12.0.0from
ew/sdk-migration-container
Draft

refactor: use @heroku/sdk for container commands#3831
erika-wallace wants to merge 2 commits into
v12.0.0from
ew/sdk-migration-container

Conversation

@erika-wallace

@erika-wallace erika-wallace commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates the following container commands to @heroku/sdk:

  • container:pull
  • container:push
  • container:run

Details

  • container:pull Replace GET /apps/{app} call with platform.app.info(app)
  • container:push Replace GET /apps/{app} call with platform.app.info(app)
  • container:run: Replace GET /apps/{app} call with platform.app.info(app)
  • src/lib/container/helpers.ts: Import type App from @heroku/types/3.sdk
  • test/unit/commands/container/: Rewrite tests to stub the SDK prototype directly

Type of Change

Breaking Changes (major semver update)

  • Add a ! after your change type to denote a change that breaks current behavior

Feature Additions (minor semver update)

  • feat: Introduces a new feature to the codebase

Patch Updates (patch semver update)

  • fix: Bug fix
  • deps: Dependency upgrade
  • revert: Revert a previous commit
  • chore: Change that does not affect production code
  • refactor: Refactoring existing code without changing behavior
  • test: Add/update/remove tests

Testing

Notes:

Steps:

  1. Replace this text with a list of steps used to validate changes or type 'Passing CI suffices'.
  2. ...

Screenshots (if applicable)

Related Issues

GUS work item: W-23383781

Migrates container:pull, container:push, and container:run commands to use
@heroku/sdk instead of direct APIClient calls.

Changes:
- Replace this.heroku.get<Heroku.App>(`/apps/${app}`) with platform.app.info(app)
- Update src/lib/container/helpers.ts to use App type from @heroku/types/3.sdk
- Remove unused @heroku-cli/schema import
Rewrites tests for container:pull, container:push, and container:run to stub
the SDK prototype directly rather than intercepting HTTP with nock.

Changes:
- Replace nock interceptors with HerokuSDK.prototype.platform stubs
- Keep sandbox pattern for DockerHelper stubs
- All tests passing with SDK-based stubbing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant