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

Gogs commit fails to deserialize commitDetails in some cases #231

Closed
GerkinDev opened this issue Nov 20, 2022 · 4 comments
Closed

Gogs commit fails to deserialize commitDetails in some cases #231

GerkinDev opened this issue Nov 20, 2022 · 4 comments

Comments

@GerkinDev
Copy link

Hi,

Using the Drone CI Web UI, I can't create a build for a repository hosted on Gogs. The error was kinda unhelpful (no stack trace, not even in logs) and was something like this responded in the HTTP response:

{"message":"json: cannot unmarshal number into Go value of type gogs.commitDetail"}

I cloned the source code & tried to dig a bit around what was happening. By using the current master branch of drone/go-scm as a replacement of github.com/drone/go-scm v1.24.0, the issue magically disappeared.

https://github.com/harness/drone/blob/99cb5c1456511aa137b7fff394b0dadde109db55/go.mod#L23

I tried to roll back in time and it appeared that my particular issue was fixed by #209; unfortunatelly, it is not released.

Would it be possible to have a release of the scm package, and drone server too using the new release ?

@jimsheldon
Copy link

Hello @GerkinDev thanks for investigating and opening this.

It sounds like your problem would be fixed if go-scm is updated to the latest version (1.27.0) in the drone server?

Would you be open to submitting a PR to the drone repo with that change, then we can close this issue? Thanks

@jimsheldon
Copy link

I missed that the change you are looking for is not part of a release yet, we will work on cutting a new release.

@GerkinDev
Copy link
Author

GerkinDev commented Nov 22, 2022

Hi, yeah it's not released; that's why I opened the issue here.

I see you're super reactive: #232 & harness/gitness#3290 thank you !

@jimsheldon
Copy link

No problem! I'll close this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants