gitnex/GitNex
41
855
Fork
You've already forked GitNex
47

Implement edit history #1441

Open
opened 2025年04月05日 12:39:43 +02:00 by d4f5409d · 4 comments

Show the history of an edited issue/comment (possibly in the three dot menu).

Show the history of an edited issue/comment (possibly in the three dot menu).

I don't see any API which supports edits or the history of edits yet. If there is, feel free to share it here.

I don't see any API which supports edits or the history of edits yet. If there is, feel free to share it here.

@mmarif There is such an API endpoint, but it is not documented for some reason.
Using the devtools, I can see that there is this endpoint:

https://{ instance.tld }/{ user }/{ repo }/issues/{ issue ID }/content-history/list?comment_id={ comment ID }

Then to get the previous comments, you use this endpoint:

https://{ instance.tld }/{ user }/{ repo }/issues/{ issue ID }/content-history/detail?comment_id={ comment ID }&history_id={ history ID }

History ID can be found in the JSON payload the first endpoint gives (value).

Here's also the code for it if it helps: forgejo.dev/forgejo.dev/forgejo@bebc244156/routers/web/repo/issue_content_history.go

@mmarif There is such an API endpoint, but it is not documented for some reason. Using the devtools, I can see that there is this endpoint: ``` https://{ instance.tld }/{ user }/{ repo }/issues/{ issue ID }/content-history/list?comment_id={ comment ID } ``` Then to get the previous comments, you use this endpoint: ``` https://{ instance.tld }/{ user }/{ repo }/issues/{ issue ID }/content-history/detail?comment_id={ comment ID }&history_id={ history ID } ``` History ID can be found in the JSON payload the first endpoint gives (value). Here's also the code for it if it helps: https://forgejo.dev/forgejo.dev/forgejo/src/commit/bebc2441567b6ff6693c9737319e42ff5347f0ac/routers/web/repo/issue_content_history.go

@asudox maybe you have mixed the API and web calls. That is for web UI. Technically that is not an API.

Web UI endpoint:
https://codeberg.org/gitnex/GitNex/issues/1441/content-history/list?comment_id=3783113

API points looks like with different JSON payloads:
https://codeberg.org/api/v1/repos/issues/search?q=test

@asudox maybe you have mixed the API and web calls. That is for web UI. Technically that is not an API. Web UI endpoint: `https://codeberg.org/gitnex/GitNex/issues/1441/content-history/list?comment_id=3783113` API points looks like with different JSON payloads: `https://codeberg.org/api/v1/repos/issues/search?q=test`

@mmarif whoops

@mmarif whoops
Sign in to join this conversation.
No Branch/Tag specified
main
release-14.0
android-17-permission-feature
release-13.0
release-12.0
release-11.0
release-10.0
release-9.0
release-8.0
release-7.0
release-6.0
release-5.5
release-5.4
release-5.3
release-5.2
release-5.1
release-5.0
release-4.5
release-4.4
release-4.3
release-4.2
release-4.1
release-4.0
release-3.5
release-3.4
release-3.3
release-3.2
release-3.1
release-3.0
release-2.5
release-2.4
release-2.3
release-2.2
release-2.1
release-2.0
release-1.5
release-1.1
release-1.2
release-1.3
release-1.4
14.0.0
13.0.1
13.0.0
13.0.0-rc4
13.0.0-rc3
13.0.0-rc2
13.0.0-rc1
12.0.0
11.0.0
10.0.1
10.0.0
9.0.0
8.0.3
8.0.2
8.0.1
8.0.0
7.0.0
6.0.0
5.5.0
5.4.0
5.3.0
5.2.1
5.2.0
5.1.1
5.1.0
5.0.1
5.0.0
4.5.0
4.4.0
4.3.0
4.2.2
4.2.1
4.2.0
4.1.0
4.0.0
3.5.1
3.5.0
3.4.0
3.3.0
3.3.0-rc3
3.3.0-rc2
3.3.0-rc1
3.2.0
3.2.0-rc1
3.1.2
3.1.1
3.1.0
3.1.0-rc2
3.1.0-rc1
3.0.1
3.0.0
3.0.0-rc3
3.0.0-rc2
3.0.0-rc1
2.5.1
2.5.0
2.5.0-rc4
2.4.1
2.4.0
2.3.2
2.3.1
2.3.0
2.2.2
2.2.1
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.0
1.5.0
1.1.0
1.2.0
1.3.0
1.4.0
Labels
Clear labels
Major-release
Minor-release
⚔️
Wontfix
This won't get fixed
⚙️
CI
Related to the CI/CD
⛏️
Breaking
Contains or will result in breaking changes
Fixed
Duplicate
Invalid
Question
❤️
Support
➡️
Frontport
➡️
Needs-frontport
🌐
Translation
🌠
Long-term
🎉
Feature
🎯
Enhancement
🏗️
Build
🐛
Bug
👋
Good-first-issue
💀
Deprecation
💡
Suggestion
💬
Discussion
💭
Brainstorming
💰
Sponsored
A feature which is sponsored by someone
💻
UI-UX
Related to the user interface or experience
📄
Documentation
📈
Performance
📌
Priority-critical
📌
Priority-high
📍
Priority-low
📍
Priority-medium
📡
Needs-feedback
📱
F-droid
📸
Release
🔒
Security
🔙
Backport
Bugfix ported to a release branch for point release
🔙
Has-backport
🔙
Needs-backport
🔙
Regression
🔭
Cannot-reproduce
🗄️
Repository
Related to this repository and it's management
🗒️
Changelog
🗓️
Summary
🤾
Google-play
🥑
Ready
🧪
Testing
🧺
Cleanup
🧺
Needs-cleanup
🧾
Confirmed
🩹
External-dependecy
🪒
Needs-refactor
🪒
Refactor
🪜
Upstream
🙇‍♂️
Help-wanted
🙇‍♂️
Needs-help
🚀
Improvement
🚨
Investigate
🛡️
Blocked
Waits for something else that must be solved first
🛰️
API-dependency
Requires and waits for changes in Gitea's API
🟦
Website
Related to the website
No labels
Major-release
Minor-release
⚔️
Wontfix
⚙️
CI
⛏️
Breaking
Fixed
Duplicate
Invalid
Question
❤️
Support
➡️
Frontport
➡️
Needs-frontport
🌐
Translation
🌠
Long-term
🎉
Feature
🎯
Enhancement
🏗️
Build
🐛
Bug
👋
Good-first-issue
💀
Deprecation
💡
Suggestion
💬
Discussion
💭
Brainstorming
💰
Sponsored
💻
UI-UX
📄
Documentation
📈
Performance
📌
Priority-critical
📌
Priority-high
📍
Priority-low
📍
Priority-medium
📡
Needs-feedback
📱
F-droid
📸
Release
🔒
Security
🔙
Backport
🔙
Has-backport
🔙
Needs-backport
🔙
Regression
🔭
Cannot-reproduce
🗄️
Repository
🗒️
Changelog
🗓️
Summary
🤾
Google-play
🥑
Ready
🧪
Testing
🧺
Cleanup
🧺
Needs-cleanup
🧾
Confirmed
🩹
External-dependecy
🪒
Needs-refactor
🪒
Refactor
🪜
Upstream
🙇‍♂️
Help-wanted
🙇‍♂️
Needs-help
🚀
Improvement
🚨
Investigate
🛡️
Blocked
🛰️
API-dependency
🟦
Website
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gitnex/GitNex#1441
Reference in a new issue
gitnex/GitNex
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?