Skip to content

refactor: use @heroku/sdk for apps:rename and apps:stacks:set commands#3753

Open
tlowrimore-heroku wants to merge 4 commits into
feat/heroku-sdk-integrationfrom
refactor/apps-rename-with-sdk
Open

refactor: use @heroku/sdk for apps:rename and apps:stacks:set commands#3753
tlowrimore-heroku wants to merge 4 commits into
feat/heroku-sdk-integrationfrom
refactor/apps-rename-with-sdk

Conversation

@tlowrimore-heroku
Copy link
Copy Markdown
Contributor

@tlowrimore-heroku tlowrimore-heroku commented Jun 5, 2026

Summary

  • Migrate src/commands/apps/rename.ts from raw this.heroku.patch to platform.app.update via @heroku/sdk.
  • Migrate src/commands/apps/stacks/set.ts from raw this.heroku.patch to platform.app.update via @heroku/sdk.
  • Drop the deprecated @heroku-cli/schema imports in both files; SDK method return types are inferred from @heroku/types/3.sdk.
  • Rewrite both unit test files to stub HerokuSDK.prototype.platform, dropping nock. Test counts and observable output unchanged.

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

  • tsc clean vs. baseline (scripts/codemods/sdk-migration/tsc-delta.sh empty)
  • eslint clean on changed files
  • mocha for test/unit/commands/apps/rename.unit.test.ts passes (2/2)
  • mocha for test/unit/commands/apps/stacks/set.unit.test.ts passes (3/3)
  • mocha for sibling test/unit/commands/apps/**/*.unit.test.ts passes (89/89)
  • Manual smoke against a real app: heroku apps:rename --app <old> <new> (verify URL output and git-remote rewrite)
  • Manual smoke against a real app: heroku apps:stacks:set heroku-24 -a <app> (verify pending vs. immediate-update message paths)

Related Issues

GUS work item: W-22264732

@tlowrimore-heroku tlowrimore-heroku marked this pull request as ready for review June 5, 2026 22:34
@tlowrimore-heroku tlowrimore-heroku requested a review from a team as a code owner June 5, 2026 22:34
@tlowrimore-heroku tlowrimore-heroku marked this pull request as draft June 5, 2026 22:37
@tlowrimore-heroku tlowrimore-heroku changed the title refactor: use @heroku/sdk for apps:rename command refactor: use @heroku/sdk for apps:rename and apps:stacks:set commands Jun 5, 2026
@tlowrimore-heroku tlowrimore-heroku marked this pull request as ready for review June 5, 2026 22:53
Copy link
Copy Markdown
Contributor

@michaelmalave michaelmalave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

2 participants