-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
improve visibility date of last edit/revision of the Git Pro book #1930
Comments
The flow from progit/progit2 to git-scm.com goes like this: flowchart TD
A[progit/progit2] -->|scheduled trigger| B
B(<a href="https://github.com/git/git-scm.com/actions/workflows/update-book.yml">Update Progit Book</a> GitHub workflow) -->|pushes to| C[git/git-scm.com]
B -->|deploys to| D[[<a href="https://git-scm.com/book/en/v2">https://git-scm.com/book/en/v2</a>]]
This Update Progit Book GitHub workflow essentially clones the Therefore, the date would have to be updated by that script. Do note, though, that it is not necessarily easy to determine the date of the latest update: many a time, there is a new commit in If you can come up with a robust way to determine the date of the latest content update (I could imagine that a workable strategy would be some sort of storing the date in the book's metadata, updating it in the GitHub workflow, right before committing, but only when |
@dscho I was just reading again a part of a workflow of a fork of a project which advances further only if there was some change at all (lines 69-72 of # collect the new raw data only if there was a change
git ls-remote https://github.com/Beliavsky/Fortran-code-on-GitHub main | \
cmp - previous_check.txt --silent || \
wget https://raw.githubusercontent.com/Beliavsky/Fortran-code-on-GitHub/main/README.md As you outline, "any change" in the remote repository (presuming
In comparison to my fork of the "Fortran packages monitor", I do not know yet if a GitHub token were useful/necessary here. It is used there because the GitHub API then offers a higher performance. Maybe the GitHub API equally allows to collect the commit date / commit hash of the latest commit to an .asc file of the remote repository -- to be tested. |
@nbehrnd I believe that it can be a lot simpler than that. We already have a scheduled GitHub workflow that picks up any changes in the ProGit book repositories, and then re-renders the respective part of That is already in place. It runs every day, at 4:29am UTC. (I picked the time of day semi-randomly.) So there is actually no need for any complicated test whether anything has changed: after committing the changes we have all the information we need at our fingertips:
At this stage, I think it would only need someone to actually go implement it, verify that it works as intended, and then open a PR. |
URL for broken page
https://git-scm.com/book/en/v2
Problem
A visitor to the page sees the cover of the Pro git book, the string
2nd Edition (2014)
, icons to fetch the documentation in one pdf/epub/mobi file. It is somewhat misleading though, because work in the source didn't stop in 2014. Page ii of the current pdf explicitly readsVersion 2.1.439, 2024-12-03
, too. (However, there is no explicit note in the html version, nor in the epub file either -- perhaps a question how the workflows are organized.) It would be better to see on first view, i.e. without need of a download to complete a note like2nd Edition (2014, last revision by 2024-12-03).
right there, on the web site itself.Because I don't know how one can relay this information from the source of Git Pro book to the web site, I am not able to prepare a PR.
Operating system and browser
Linux Debian 13/trixie (currently branch testing); Firefox 128.4.0esr (64-bit).
Steps to reproduce
not applicable here
Other details
Ben Straub agrees this could represent an improvement, see progit/progit2#1996.
The text was updated successfully, but these errors were encountered: