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

GitHubError: Validation Failed (422) #133

Closed
talbright opened this issue Oct 5, 2018 · 3 comments
Closed

GitHubError: Validation Failed (422) #133

talbright opened this issue Oct 5, 2018 · 3 comments
Assignees
Labels
type::support Issues that do not require modifications to a project, such as questions, guidance, etc.

Comments

@talbright
Copy link

talbright commented Oct 5, 2018

Any hints as to why this is failing?

env DEBUG="conventional-github-releaser,octokit:rest*" conventional-github-releaser -p angular -r 0
  conventional-github-releaser posting { endpoint: 'https://api.github.com/', body: { body: '\n\n\n', draft: false, name: '0.0.1', prerelease: false, tag_name: '0.0.1', target_commitish: undefined } } to the following URL - repos/xxx/xyzzy/releases +0ms
GitHubError: Validation Failed (422)
@dortzur
Copy link

dortzur commented Dec 17, 2018

I believe this happens when you already have a release available for that semver version. Updating the semver version in package.json worked for me.

@stevemao
Copy link
Member

Looks like an issue with the same title ready opened. #50

@hutson hutson added the type::support Issues that do not require modifications to a project, such as questions, guidance, etc. label Dec 20, 2018
@thebug404
Copy link

Any hints as to why this is failing?

env DEBUG="conventional-github-releaser,octokit:rest*" conventional-github-releaser -p angular -r 0
  conventional-github-releaser posting { endpoint: 'https://api.github.com/', body: { body: '\n\n\n', draft: false, name: '0.0.1', prerelease: false, tag_name: '0.0.1', target_commitish: undefined } } to the following URL - repos/xxx/xyzzy/releases +0ms
GitHubError: Validation Failed (422)

Suggestion

In my particular case, I experienced this problem because when executing the command conventional-github-releaser -p angular -r 0, no message appeared providing information on whether the release was completed successfully or not. Due to this, I re-executed the command and an error appeared.

It would be great if the developers added feedback on the operations. It would be very helpful. 🫶

Solution

The error "GitHubError: Validation Failed (422)" occurs when the release version already exists on GitHub or when the repository URL is invalid in the package.json.

To solve this error, you can try the following:

  1. Verify that the release version does not exist on GitHub.
  2. Verify that the repository URL is valid in the package.json .
  3. Create a new token and select the public_repo scope (or repo to access private repositories). Run the following command to set the token as an environment variable: export CONVENTIONAL_GITHUB_RELEASER_TOKEN=<MY_TOKEN>
  4. Run the command conventional-github-releaser -p angular -r 0

By following these steps, you should resolve your problem. I hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::support Issues that do not require modifications to a project, such as questions, guidance, etc.
Development

No branches or pull requests

5 participants