Skip to content

[API] No edit history shown afer editing an issue's body #30807

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

Closed
Android-X13 opened this issue May 1, 2024 · 0 comments · Fixed by #30814
Closed

[API] No edit history shown afer editing an issue's body #30807

Android-X13 opened this issue May 1, 2024 · 0 comments · Fixed by #30814
Labels
topic/api Concerns mainly the API type/bug

Comments

@Android-X13
Copy link

Description

  1. Create an issue (either via the web interface or the API)

  2. Edit the issue via the API

body=$(curl -s http://localhost:3000/api/v1/repos/$org/$repo/issues/$i \
  -H "Accept: application/json" \
  -H "Authorization: token $TOKEN" | jq -r .body)

body+=$'\n\n'"Test 1"$'\n\n'"Test 2"

curl -s -X 'PATCH' http://localhost:3000/api/v1/repos/$org/$repo/issues/$i \
  -H "Accept: application/json" \
  -H "Authorization: token $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{ \"body\":\"$body\" }"
  1. Refresh the page in the browser, the issue content has changed but there is no indication that it has been edited or edit history. Basically the issue_content_history table is not touched when editing issues via API calls.

Gitea Version

1.21.11

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Binary download, systemd

Database

None

@yp05327 yp05327 added the topic/api Concerns mainly the API label May 2, 2024
lunny pushed a commit that referenced this issue May 3, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue May 3, 2024
silverwind pushed a commit that referenced this issue May 3, 2024
…30845)

Backport #30814 by @yp05327

Fix #30807

reuse functions in services

Co-authored-by: yp05327 <576951401@qq.com>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 1, 2024
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this issue Jan 23, 2025
…#30814)

Fix go-gitea#30807

reuse functions in services

(cherry picked from commit a50026e)

Conflicts:
	models/issues/issue_update.go
	routers/api/v1/repo/issue.go
	trivial context conflict because of 'allow setting the update date on issues and comments'
(cherry picked from commit 6a4bc02)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/api Concerns mainly the API type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants