go-semantic-release / semantic-release

📦🚀 semantic-release written in Go
https://go-semantic-release.xyz
MIT License
404 stars 43 forks source link

Ref_name is invalid error #130

Closed tarpanpathak closed 2 years ago

tarpanpathak commented 2 years ago

Hello,

First of, thank you for releasing this tool. It has been a great experience thus far.

Without any changes to our environment, we are currently getting the following error when using semantic-release:

[go-semantic-release]: version: 2.17.2
[go-semantic-release]: ci-condition plugin: GitLab CI@1.4.0
[go-semantic-release]: provider plugin: GitLab@1.6.0
[go-semantic-release]: getting default branch...
[go-semantic-release]: found default branch: <redacted>
[go-semantic-release]: repo is private
[go-semantic-release]: found current branch: <redacted>
[go-semantic-release]: found current sha: <redacted>
[go-semantic-release]: running CI condition...
[go-semantic-release]: getting latest release...
[go-semantic-release]: found version: <redacted>
[go-semantic-release]: getting commits...
[go-semantic-release]: GET https://gitlab.com/api/v4/projects/<project_id>/repository/commits: 400 {error: ref_name is invalid}
[go-semantic-release]: stopping plugins...

When I make an API call using the same token to the endpoint above, i.e. https://gitlab.com/api/v4/projects/<project_id>/repository/commits, I get a valid (i.e. HTTP/200) response.

Here are specific details for our environment:

CI tool: GitLab CI GitLab CI version: GitLab Enterprise Edition 14.8.0-pre Semantic Release version: 2.17.2 Semantic Release command: semantic-release --token ${token} --version-file --allow-no-changes Note: the tool runs inside of Docker

What am I doing wrong?

sauramirez commented 2 years ago

We are also experiencing the same issue. I believe gitlab released something recently that might have changed the response received from the endpoint

sauramirez commented 2 years ago

The commits ref_name seems to returning a 400 validation error https://gitlab.com/api/v4/projects/<redacted>/repository/commits?ref_name=<redacted>...<redacted>

{"error":"ref_name is invalid"}

christophwitzko commented 2 years ago

Thanks for reporting! @cliedeman do you know anything about this?

cliedeman commented 2 years ago

Looks like its a regression and a fix is on its way.

Not sure how to tell when it will land

tarpanpathak commented 2 years ago

In case this is helpful for anyone else, the GitLab team has fixed the issue and our automation is working normally again. Apologies for the false alarm. I'll close this out.