nessie icon indicating copy to clipboard operation
nessie copied to clipboard

REST API to fetch the Date of Repository Initialization or Date of First Commit

Open swillis12 opened this issue 2 years ago • 3 comments

Description: Requesting the ability to know either the date of the first commit or when the repository was initialized.

Requested Changes in public API:

  • Changes in REST API

Expected Use Cases: In a UI when showing a date picker for selecting a commit before a certain time, this would help to disable irrelevant dates. E.g. if the repo was initialized on Aug 24, 2022, we can grey out/disable dates before that time so that the user cannot select them.

swillis12 avatar Aug 24 '22 21:08 swillis12

We do have an internal "property bag" for the repository (RepositoryDescription), for things that rarely change. The creation date of the repository could be stored there and exposed via a REST API

snazy avatar Aug 26 '22 16:08 snazy

Good point! I was thinking about server properties in the /config end point, but adding a dedicated endpoint to return a RepositoryDescription is even better.

dimas-b avatar Aug 26 '22 19:08 dimas-b

Not sure whether it’s good to return the whole object or the whole map. Rather a property in RD exposed via /config as an Instant

snazy avatar Aug 26 '22 19:08 snazy