vscode-pull-request-github: Creating pull requests failed: HttpError: Validation Failed
Whenever I try to create a PR I get
[Debug 28373s 194ms] GitHubRepository> Creating pull requests failed: HttpError: Validation Failed
right after I choose target branch
- Extension version: 0.8.0
- VSCode Version: 1.35.1 (1.35.1)
- OS: MacOS Mojave
Steps to Reproduce:
- Install exetnsion
- restart VScode
- Create new branch
- Attempt to create new PR by pressing + button
- Leave master as target branch
- Observe error message
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 22
- Comments: 25 (4 by maintainers)
Commits related to this issue
- Use max issue number to know if #1234 could be a real issue Fixes #1860 — committed to microsoft/vscode-pull-request-github by alexr00 4 years ago
- Use max issue number to know if #1234 could be a real issue Fixes #1860 — committed to microsoft/vscode-pull-request-github by alexr00 4 years ago
- Use max issue number to know if #1234 could be a real issue Fixes #1860 — committed to microsoft/vscode-pull-request-github by alexr00 4 years ago
I keep getting this warning when trying to create a pull request:
Creating pull requests for ‘Scyfren:Scyfren/issue18’ failed: Validation Failed: Value “undefined” cannot be set for field undefined (code: custom)
I’m sure that I’m putting in a title name when using custom. This even shows up when trying to use the commit and branch option. I think it started happening when I accidentally tried to create a pull request using the custom option but with no title.
I had the same issue. it appears that I was logged in with my private github user and not with the github user I have for work. after logging in with my work user I was able to create the PR
Unfortunately, the logs aren’t currently detailed enough to know what the exact cause is - there are several reasons why validation might fail when creating a pull request. One common one is there being no difference in commits between the target branch and the current branch. Possibly the extension isn’t correctly setting a title.
I have already check in a change that should fix the way we format the error from GitHub, so there should be more details in both the extension output log and in the notification. This is available in the nightly version of the extension (https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github-insiders), can you give it a try there to see if there’s more information? Note that if you do install the nightly version, you should disable the normal version of the extension so that they don’t conflict with each other
I think everyone who’s seeing this is trying to create a PR where the “from” and “into” branches have the same head. We now show a better message:
If anyone is seeing something other than that, please comment!
Extension version 0.12.0 should now show a more detailed error notification when this happens - please let me know what you see