forgejo/services/repository
Gusted 23cc1fdbbe feat(api): add last_commit_when to contents response (#7418)
- 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, https://github.com/go-gitea/gitea/pull/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 <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-18 09:31:40 +00:00
..
archiver Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
commitstatus chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
files feat(api): add last_commit_when to contents response (#7418) 2025-04-18 09:31:40 +00:00
gitgraph chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
adopt.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
adopt_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
avatar.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
avatar_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
branch.go feat: move StopTask, CancelPreviousJobs and CleanRepoScheduleTasks to services/actions 2025-04-10 08:38:27 +02:00
cache.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
check.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
collaboration.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
collaboration_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
commit.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
contributors_graph.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
contributors_graph_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
create.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
create_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
delete.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
fork.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
fork_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
generate.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
generate_test.go Move generate from module to service (#29465) 2024-03-06 12:10:44 +08:00
hooks.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
init.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
lfs.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
lfs_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
main_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
migrate.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
push.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repository.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repository_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
review.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
review_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
setting.go feat: move StopTask, CancelPreviousJobs and CleanRepoScheduleTasks to services/actions 2025-04-10 08:38:27 +02:00
star.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
sync_fork.go feat: sync forks (#2364) 2025-04-07 07:00:38 +00:00
template.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
transfer.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
transfer_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00