[pull] trunk from cli:trunk - #206
Merged
Merged
Conversation
The X-Oauth-Scopes response header is comma-space separated, so splitting
on "," alone left a leading space on every element but the first. Since
the API returns scopes in sorted order, "workflow" was effectively never
first and the check returned false for every OAuth token.
The guard on the 404 path therefore never held, so every 404 from
POST /repos/{owner}/{repo}/releases was rewritten into a "workflow" scope
hint, masking the real cause (missing repo, typo, no push access).
Trim each element before comparing, matching generateScopesSuggestion in
api/client.go. The existing test fixtures used unspaced scope lists,
which is why this shipped, so they now use realistic spacing.
Fixes #14063
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 38e2ccc8-92eb-4795-849f-2f519e0040b2
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 38e2ccc8-92eb-4795-849f-2f519e0040b2
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 598c3576-22dc-4d7f-a72d-4f84922174a1 Copilot-Session: d5151527-3286-43fd-a420-38f496a076fa
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 598c3576-22dc-4d7f-a72d-4f84922174a1 Copilot-Session: d5151527-3286-43fd-a420-38f496a076fa Copilot-Session: a237433f-9657-4224-bad4-c4dc1c0fdc31
Route release creation through api.Client
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )