Skip to content

refactor(config): use @heroku/sdk - #3893

Merged
erika-wallace merged 2 commits into
v12.0.0from
ew/sdk-migration-config
Aug 28, 2026
Merged

refactor(config): use @heroku/sdk#3893
erika-wallace merged 2 commits into
v12.0.0from
ew/sdk-migration-config

Conversation

@erika-wallace

Copy link
Copy Markdown
Contributor

Summary

This PR migrates the following config commands to use @heroku/sdk:

  • config/edit
  • config/get
  • config/index
  • config/set
  • config/unset

Details:

  • Replaced direct API calls with the SDK
  • Rewrote tests to stub the SDK directly instead of using nock

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:

The SDK uses heroku-fetch to make API calls, which looks for a netrc file. Therefore, we must log in with HEROKU_NETRC_WRITE=true.

Setup:

  • Pull down this branch
  • npm i && npm run build
  • heroku logout
  • HEROKU_NETRC_WRITE=true ./bin/run login

Steps:

# Sets config vars
./bin/run config:set TEST_ONE=test1 TEST_TWO=test2 --app $APP

# Lists new config vars
./bin/run config --app $APP

# Opens an editor for config var updates (update the value of TEST_ONE only)
./bin/run config:edit --app $APP

# Gets config vars (TEST_ONE should be updated, TEST_TWO should be the same)
./bin/run config:get TEST_ONE TEST_TWO --app $APP

#Unset config vars
./bin/run config:unset TEST_ONE TEST_TWO --app $APP

Cleanup:

  • ./bin/run logout

Screenshots (if applicable)

Related Issues

GUS work item: W-23387800

@erika-wallace
erika-wallace requested a review from a team as a code owner August 28, 2026 18:27
@erika-wallace
erika-wallace deployed to AcceptanceTests August 28, 2026 18:27 — with GitHub Actions Active
@erika-wallace
erika-wallace deployed to AcceptanceTests August 28, 2026 18:27 — with GitHub Actions Active
@erika-wallace
erika-wallace deployed to AcceptanceTests August 28, 2026 18:27 — with GitHub Actions Active
@erika-wallace
erika-wallace deployed to AcceptanceTests August 28, 2026 18:27 — with GitHub Actions Active

@tlowrimore-heroku tlowrimore-heroku left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@erika-wallace
erika-wallace merged commit 7309f0f into v12.0.0 Aug 28, 2026
19 checks passed
@erika-wallace
erika-wallace deleted the ew/sdk-migration-config branch August 28, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants