Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating pull requests failed: HttpError: Validation Failed #1234

Closed
gavrix opened this issue Jun 13, 2019 · 25 comments · Fixed by #5487
Closed

Creating pull requests failed: HttpError: Validation Failed #1234

gavrix opened this issue Jun 13, 2019 · 25 comments · Fixed by #5487
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@gavrix
Copy link

gavrix commented Jun 13, 2019

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:

  1. Install exetnsion
  2. restart VScode
  3. Create new branch
  4. Attempt to create new PR by pressing + button
  5. Leave master as target branch
  6. Observe error message
@jdwestbrook
Copy link

I believe I am having the same issue trying to create a pull request when following
the steps above, creating a new pull request using the '+' option using a local
and published branch. Output shown below.

I was able to create the pull request manually using the 'hub pull-request' command,
and once created I was able to see and navigate around in the pull request using the
extension which is great. I am stuck trying to use the extension to create the PR from
a branch.

Installation details:

Code - Insiders
Version 1.36.0-insider (1.36.0-insider)
fe0c3e785c22c3ed2d5caa7178488c92d62bdb08
MacOs 10.14.5 Mojave

Installed Extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

Pull request output:

[Info] Looking for git repository
[Info] Git repository found, initializing review manager and pr tree view.
[Info] Found GitHub remote
[Info] https://api.github.com: GraphQL support detected
[Info] Review> no matching pull request metadata found for current branch undefined
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch undefined
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch master
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch master
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch azure-ci-v1
[Info] GitHubRepository> Creating pull requests failed: HttpError: Validation Failed
[Info] GitHubRepository> Creating pull requests failed: HttpError: Validation Failed
[Info] GitHubRepository> Creating pull requests failed: HttpError: Validation Failed
[Info] Found GitHub remote

@radmedov
Copy link

radmedov commented Jul 1, 2019

Any solution to this? I'm having the same issue

@RMacfarlane RMacfarlane added the bug Issue identified by VS Code Team member as probable bug label Jul 2, 2019
@marnovo
Copy link

marnovo commented Aug 8, 2019

+1 here.

@ghost
Copy link

ghost commented Aug 19, 2019

+1

1 similar comment
@andycognitoiq
Copy link

+1

@rodion-m
Copy link

The same issue. Please fix.

@1adamf
Copy link

1adamf commented Aug 27, 2019

+1

1 similar comment
@Ballzer0
Copy link

+1

@AmitKKhanchandani
Copy link

+1

Any Solution for this?

@RMacfarlane
Copy link
Contributor

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

@horizon-it-uk
Copy link

+1

@RMacfarlane
Copy link
Contributor

Extension version 0.12.0 should now show a more detailed error notification when this happens - please let me know what you see

@jzsplk
Copy link

jzsplk commented Nov 21, 2019

+1

@RMacfarlane
Copy link
Contributor

@jzsplk Was there any additional information in the error? What version of the extension are you using?

@JoyceMassau
Copy link

+1
Pull request creation failed. Validation failed: You can't perform that action at this time.

  • OS: Windows 10 Home Single

Any Solution for this?

@yogevh
Copy link

yogevh commented May 20, 2020

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

@Scyfren
Copy link

Scyfren commented Jun 19, 2020

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.

@SamErde
Copy link

SamErde commented Aug 1, 2020

Reproduced with plugin version v0.18.0 and VS Code 1.47.3 with git version 2.27.0.windows.1 on Windows 10 1909.

@mrevow
Copy link

mrevow commented Aug 1, 2020

I also get this with visual code 1.47.3 running on ubuntu 18.04.1 VM in azure. The full error message is

Creating pull requests for 'mrevow:master' failed: Validation Failed: Value "undefined" cannot be set for field undefined (code: custom)

@hyungjunk
Copy link

hyungjunk commented Aug 13, 2020

I tried back and forth and have found some kind of rules(?) where it doesn't complain validation error and works fine.
The new_branch that you want to merge into master has to exist at repository.
Create branch at your local environment -> push that branch to the repository -> And make a PR for master branch
Doing like this works for me so far.

@brianjmurrell
Copy link

Seems this issue has been open a long time with many people hitting it.

Can't anything be done about it?

@sebride4988
Copy link

I solved it by clearing the code source and doing a fresh clean copy.
I guess the git config was wrong.
I hope my solution will help others.

@Prasundas99
Copy link

Any solution to this? I'm having the same issue

@alexr00
Copy link
Member

alexr00 commented Nov 17, 2021

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:

image

If anyone is seeing something other than that, please comment!

@alexr00 alexr00 closed this as completed Nov 17, 2021
@mike-koala-bear
Copy link

Ok thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.