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

Closed
opened 2025-11-02 04:50:35 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @zopanix on GitHub (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

Originally created by @zopanix on GitHub (Jan 30, 2019). - Gitea version (or commit ref): 1.7.0 - Git version: ??? - Operating system: docker: gitea/gitea:1.7.0 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: https://gist.github.com/zopanix/e6a3fb54ad1b285f3970fb095a28bf4e ## 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
GiteaMirror added the issue/duplicate label 2025-11-02 04:50:35 -06:00
Author
Owner

@zopanix commented on GitHub (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

@zopanix commented on GitHub (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
Author
Owner

@techknowlogick commented on GitHub (Jan 30, 2019):

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 commented on GitHub (Jan 30, 2019): 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.
Author
Owner

@zeripath commented on GitHub (Jan 30, 2019):

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

@zeripath commented on GitHub (Jan 30, 2019): This should be fixed by #5894. Please could you test on 1.7.1
Author
Owner

@zopanix commented on GitHub (Jan 30, 2019):

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

@zopanix commented on GitHub (Jan 30, 2019): Thank you, I will test it once 1.7.1 is released. Users will be glad to hear it's fixed :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2839