On Sun, Oct 10, 2021 at 5:43 PM ToddAndMargo via users
<users(a)lists.fedoraproject.org> wrote:
Any way to get git to show me the revision
without downloading the turkey?
Yes, use the API:
https://docs.gitlab.com/ee/api/commits.html
The Project ID is listed on the project page (67, in this case):
https://gitlab.freedesktop.org/spice/win32/spice-nsis
Some examples:
Pull one page of commit details in JSON format and reformat it with JQ
for readability:
curl
https://gitlab.freedesktop.org/api/v4/projects/67/repository/commits | jq
Pull information on just one commit:
https://gitlab.freedesktop.org/api/v4/projects/67/repository/commits'...
| jq
Use JQ to print the "id" field from one commit:
curl
https://gitlab.freedesktop.org/api/v4/projects/67/repository/commits'...
| jq '.[] | .id'