Clarify missing pull request errors - #88
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ca15071a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f56c2e4124
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const prNumber = String(pr).replace( | ||
| /^.*\/pull\/(\d+)(?:\/.*)?$/, | ||
| "$1", | ||
| ); |
There was a problem hiding this comment.
Strip URL queries before formatting guidance
For --pr https://github.com/acme/widgets/pull/7?diff=split (or a fragment URL), this anchored regex does not match, so prNumber remains the entire URL and the retry text again produces a malformed /pull/https://... URL. This is fresh evidence beyond the resolved plain-URL case: the public parser accepts these values because it validates URL.pathname, and gh pr view --help supports a <url> argument; GitHub CLI 2.96.0 also parses that queried URL as PR 7. Extract the number from a parsed URL's pathname or allow query and fragment suffixes.
Useful? React with 👍 / 👎.
Closes #84
Treat GitHub's missing pull request response apart from auth failures. Missing pull request errors now name the inferred repo and show both supported ways to choose another repo. Auth failures still point to
gh auth status.Depends on #83.
Verified with
corepack pnpm run check.