-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add last_committer_date
and last_author_date
for file contents API
#32921
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
Conversation
ci test failed |
Hmm, that's for commit, not for content ....... |
I think If I understand correctly:
|
The requirement is |
475b482
to
c5467d1
Compare
b46b083
to
11e07cf
Compare
11e07cf
to
4502328
Compare
last_committer_date
and last_author_date
for file contents API
* giteaofficial/main: [skip ci] Updated translations via Crowdin docs: add Chinese translations for README files (go-gitea#34132) Keep file tree view icons consistent with icon theme (go-gitea#33921) Make markdown render match GitHub's behavior (go-gitea#34129) Remove dead code: RepoRef (go-gitea#34131) Correctly handle submodule view and avoid throwing 500 error (go-gitea#34121) Use `overflow-wrap: anywhere` to replace `word-break: break-all` (go-gitea#34126) Fix markdown render behaviors (go-gitea#34122) Refactor dropdown ellipsis (go-gitea#34123) Avoid creating unnecessary temporary cat file sub process (go-gitea#33942) Fix discord webhook 400 status code when description limit is exceeded (go-gitea#34084) Refactor markup render to fix various path problems (go-gitea#34114) [skip ci] Updated translations via Crowdin Fix invalid version in RPM package path (go-gitea#34112) also check default ssh-cert location for host (go-gitea#34099) (go-gitea#34100) Fix markdown frontmatter rendering (go-gitea#34102) Get changed files based on merge base when checking `pull_request` actions trigger (go-gitea#34106) Add `last_committer_date` and `last_author_date` for file contents API (go-gitea#32921)
- Add a new field `last_commit_when` to the `ContentResponse` type, which is populated with the last commit's commiter date. This can be used to determine when the last edit of the content was. - This field is compatible with what Gitea will likely add, go-gitea/gitea#32921. There's no field for this information in the Github API, so no way to be compatible with that (this API endpoint is otherwise fully compatible with Github's API). - Ref: gitnex/GitNex#1225 - Integration test adjusted. The API tests cannot test the actual output, as `testify` tries to 'deep equal' the `time.Time` structs which will differ due how the `time.Time` struct is created. Unit tests still verify the output. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7418 Reviewed-by: Earl Warren <[email protected]> Co-authored-by: Gusted <[email protected]> Co-committed-by: Gusted <[email protected]>
Fix #32886
Add
last_committer_date
andlast_author_date
in the content API which is not implemented by Github API v3 at the moment.