refactor(workspace): rename changeuri to githubpr and simplify request types - #272
Open
xytan0056 wants to merge 4 commits into
Open
refactor(workspace): rename changeuri to githubpr and simplify request types#272xytan0056 wants to merge 4 commits into
xytan0056 wants to merge 4 commits into
Conversation
xytan0056
commented
Aug 6, 2026
| pr, err := githubpr.Parse(rawURL) | ||
| if err != nil { | ||
| return nil, err | ||
| return nil, fmt.Errorf("invalid change URI %q: %w", rawURL, err) |
Contributor
Author
There was a problem hiding this comment.
wrapped as usererror in native_orchestrator.go call site
xytan0056
force-pushed
the
refactor/workspace-request-types
branch
from
August 6, 2026 03:01
20b1d56 to
a3e4628
Compare
yushan8
reviewed
Aug 6, 2026
| @@ -0,0 +1,80 @@ | |||
| // Copyright (c) 2025 Uber Technologies, Inc. | |||
Contributor
There was a problem hiding this comment.
Suggested change
| // Copyright (c) 2025 Uber Technologies, Inc. | |
| // Copyright (c) 2026 Uber Technologies, Inc. |
yushan8
approved these changes
Aug 6, 2026
…t types - Move core/changeuri/ to core/workspace/githubpr/ — it's a GitHub PR URI parser, not a generic change URI package. - Rename gitrequest.go to githubpr_request.go; rename gitRequest struct to githubPRRequest; rename requestID field to pr.Number. - newGitHubPRRequest now accepts a githubpr.PullRequest directly instead of decomposed scalar fields. - Simplify NewRequest: single githubpr.Parse call replaces the url.Parse + scheme switch + changeuri.Parse double-parse.
xytan0056
force-pushed
the
refactor/workspace-request-types
branch
from
August 6, 2026 16:27
a3e4628 to
51d79b2
Compare
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
core/changeuri/→core/workspace/githubpr/— it's a GitHub PR URI parser, not a generic change URI package. Lives underworkspacesince that's its only consumer.gitrequest.go→githubpr_request.go;gitRequest→githubPRRequest;requestID→pr.Number.newGitHubPRRequestaccepts agithubpr.PullRequestdirectly instead of decomposed scalar fields.NewRequest: singlegithubpr.Parsecall replaces theurl.Parse+ scheme switch +changeuri.Parsedouble-parse.NewRequestinstead of the (now unexported) constructor.Test plan
CI
local test