-
Notifications
You must be signed in to change notification settings - Fork 128
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
Release fails when adding "release" labels. Error 422. #138
Comments
Is this running against GitHub enterprise? The endpoint to add labels was recently changed. Instead of accepting labels as array in the request body, they are now sent with a "labels" namespace. The change breaks usage with GitHub enterprise, I don’t think they will backport that fix. I’m not sure how to address this :/ we could workaround it in For reference
|
@gr2m Yes this is Github Enterprise. Version 2.12. We are moving to 2.14 tomorrow apparently. The odd thing is that other repos with this same setup are not experiencing this issue. It is sort of hit or miss depending on what yarn resolves I think. |
@gr2m one thought I would have is can you check the version of GHE you are hitting? If below a certain version fallback? |
For now, what I have gone and done is the following in
Not a perfect solution, but it unblocks us until this stuff is figured out. It is interesting because even though I specified that version as a devDependency, |
@gr2m it seems that |
The idea of a GHE requirement is something we started to discuss with the Octokit maintainers across the supported languages, we don’t have a conclusion yet.
No the GHE version is still supported
Yes, you are right, sorry for the trouble :( The approach I am taking is that you will be able to load the endpoint methods for a certain enterprise version, which will still work on api.github.com. I only created a plugin for enterprise endpoints this week: https://github.com/octokit/plugin-enterprise-rest.js. In theory, we should be able to do this: const Octokit = require('@octokit/rest')
.plugin(require('@octokit/enterprise-rest/v2.15'))
const octokit = new Octokit({
baseUrl: 'https://github.acme-inc.com/api/v3'
}) and it will override methods such as |
So that mean the Shouldn't It's probably a good idea to use a plugin internally to support both the old and new endpoint but I don't think it should have to be defined by the Maybe the solution is an internal/default plugin that would be called on errors and:
This plugin would have to maintain a list of data transform to insure the compatibility with old endpoint that are not deprecated yet. |
I mean that semantic-release can use |
The thing is I don't know which version I want to support, because I don't know which version of GHE are supported, and what each version deprecate and change. I just want to support all versions that GitHub support. For now semantic-release users have to specify If for now supporting all version of GHE supported by GitHub means reverting to |
It's not that simple, GitHub is adding new APIs all the time and people want to use it. But these new APIs won’t work on GitHub Enterprise. So in the end you will have to decide which GitHub versions you want to support and pick the right Octokit version that supports the GitHub Enterprise version you need. Hence the LTS approach, we will have maintenance versions that we will keep supporting as long as the respective enterprise versions are supported |
So that mean in For Anyway, you have a better understanding of the situation than me, so you know what's the best solution! |
Here is a PR implementing the workaround using That’s the simplest fix right now |
👍If you think that's the best for now, let's go with that! |
🎉 This issue has been resolved in version 5.2.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thank you both for taking the time to address this! I'm happy to work with you guys on GHE support long term as we use it. However, moving to 2.14 may change some things so who knows how much use that will be in the future. |
@pvdlg Just wanted to clarify. It seems it was published to the |
I just added |
Hello,
I'm not sure which version introduced this issue, but I know it happens as far back as 5.2.1 for me (It happened on 5.2.5 and 5.2.6).
I'm seeing the following only when PRs are merged:
My config looks like:
Any help or direction on how to fix this would be wonderful. I'm not sure when it started, but it is making it hard to release continuously.
The text was updated successfully, but these errors were encountered: