feat: add credential manager configuration to the oclif init hook - #3786
Merged
Conversation
…ing git config, and added tests so it stays closed.
…s`, the command shell completion actually runs, so the hook never skipped completion.
erika-wallace
left a comment
Contributor
There was a problem hiding this comment.
LGTM. I had a few suggestions/questions about the code though.
…i_init_hook' into jbd_git_credential_manager_in_cli_init_hook
erika-wallace
approved these changes
Jun 26, 2026
jdodson
enabled auto-merge (squash)
June 26, 2026 18:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In order to ensure that our customers are able to continue working with their existing Heroku projects without interruption, we are going to temporarily add the configuration of the git credential manager to the oclif init hook in the CLI. The plan is to add it now and then remove it potentially as part of the v12 release of the CLI.
What's done:
Type of Change
Breaking Changes (major semver update)
!after your change type to denote a change that breaks current behaviorFeature Additions (minor semver update)
Patch Updates (patch semver update)
Testing
Build first:
This change adds a hook that runs before every CLI command and tells git to use
heroku git:credentialsfor Heroku git operations. The steps below confirm it works, runs everywhere it should, and never breaks a command.First, clear the setting so you can watch the hook add it:
Expected:
!heroku git:credentials--version,-v, theversioncommand,autocomplete, or bareheroku. For each skipped invocation below, clear the setting first, run the command, then check that nothing was added:Expected: nothing printed after any of the
--getchecks (the setting was not added)Expected: the version prints and the command exits normally (no crash, no error from the hook)
Screenshots (if applicable)
Related Issues
GUS work item: https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00002coSPMYA2/view