Repository navigation
feat: add --team to authorizations:info and authorizations:update - #3923
Closed
michaelmalave wants to merge 2 commits into
Closed
michaelmalave wants to merge 2 commits into
michaelmalave wants to merge 2 commits into
Conversation
…W-24132434)
Adds a --team flag to both commands so they target a team-owned OAuth
authorization at /teams/${team}/oauth/authorizations/${id} instead of the
default /oauth/authorizations/${id} user path. Without --team, behavior is
unchanged. Unit tests cover both the team and non-team paths.
…pdate The team-owned authorizations API route (/teams/:team/oauth/authorizations) is gated behind the 3.sdk API variant; without the Accept header the request 404s. Send SDK_HEADER on the --team path only and assert it in the team tests.
Contributor
Author
|
Closing: no CLI change required. There is no team-scoped |
This branch was successfully deployed
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
Adds a
--teamoption toheroku authorizations:infoandheroku authorizations:updateso an admin can inspect and modify an OAuth authorization owned by a team, not just their own personal tokens. Without the flag, both commands behave exactly as before.--team(sharedflags.team()helper) toauthorizations:infoandauthorizations:update./teams/{team}/oauth/authorizations/{id}when--teamis set; keep the existing/oauth/authorizations/{id}path otherwise.Type of Change
Feature Additions (minor semver update)
Testing
Notes:
Automated: scoped authorizations unit suite is green (
npm run test:ci:unitis chronically broken onclimainindependent of this diff, so verification runs the scoped suite). Live smoke exercises the real team-authorizations endpoint that unit tests mock.Steps:
git fetch origin worker/gus-a3QEE000002hXIv2AM-2026-09-14-task-1 && git checkout worker/gus-a3QEE000002hXIv2AM-2026-09-14-task-1npm ci && npm run buildheroku login./bin/run authorizations:info <AUTHORIZATION_ID> --team <TEAM>— Expect: prints the team-owned authorization./bin/run authorizations:info <AUTHORIZATION_ID> --team <TEAM> --json— Expect: same, as JSON./bin/run authorizations:update <AUTHORIZATION_ID> --team <TEAM> --description "smoke test"— Expect: updates the team-owned authorization./bin/run authorizations:info <PERSONAL_AUTHORIZATION_ID>— Expect: unchanged personal-token behavior (no--team)Additional Context
flags.team()(the shared@heroku-cli/commandhelper reused here, as inapps/members) carries an env-var default:--org→HEROKU_TEAM→HEROKU_ORGANIZATION. So a user withHEROKU_TEAM/HEROKU_ORGANIZATIONexported will be routed to the team endpoint even without passing--team. This matches existing team-scoped commands; flagging it because these two commands did not previously have a team flag.Related Issues
GUS work item: W-24132434