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

[BUG] - Unable to post comments on issues using API #5904

Closed
2 of 7 tasks
zopanix opened this issue Jan 30, 2019 · 4 comments
Closed
2 of 7 tasks

[BUG] - Unable to post comments on issues using API #5904

zopanix opened this issue Jan 30, 2019 · 4 comments
Labels
issue/duplicate The issue has already been reported.

Comments

@zopanix
Copy link

zopanix commented Jan 30, 2019

Description

I have an error when posting comments using the API on certain repositories.

API PATH:
POST /repos/{owner}/{repo}/issues/{index}/comments

I think I've target the repositories to those who were created in organizations that were created in gitea version 1.6.X, we migrated to 1.7.0 and are unable to post comment using the api

I tested it on a new organization (created on version 1.7.0) and API works fine.
I tested it on a new repository of a user created in 1.6.X and API works fine.

We unfortunately do not have a repository of a user which were both created in version 1.6.x

FYI: we migrated to 1.7.0 from 1.6.4
FYI: we have an auth source of SMTP setup, this happens whether the user is local or SMTP source

Version that were deployed: 1.6.2, 1.6.3, 1.6.4, 1.7.0

curl -X POST \
  "https://scm.example.com/api/v1/repos/{org}/{repo}/issues/{index}/comments" \
  -H "accept: application/json" \
  -H "Authorization: token {censured}d5397f04095dc53887e1d2099cf4" \
  -H "Content-Type: application/json" \
  -d "{ \"body\": \"This comment was sent using the API\"}"

The above curl responds with a 500 error, logs are available in gist above

Other API calls are working fine, whether their POST's or GET's, didn't test them all tough

@zopanix
Copy link
Author

zopanix commented Jan 30, 2019

PS: On the gist, "sensible" information was replaced with placeholders as in examples. I can provide you with more information if needed

@techknowlogick
Copy link
Member

Thank you for the report @zopanix. This has been resolved and will be released in v1.7.1. If you need this fixed urgently you can use 1.7 binary (or docker image) as that has commits that will be released with 1.7.1.

@techknowlogick techknowlogick added the issue/duplicate The issue has already been reported. label Jan 30, 2019
@zeripath
Copy link
Contributor

This should be fixed by #5894. Please could you test on 1.7.1

@zopanix
Copy link
Author

zopanix commented Jan 30, 2019

Thank you, I will test it once 1.7.1 is released. Users will be glad to hear it's fixed :)

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported.
Projects
None yet
Development

No branches or pull requests

3 participants