WordPress/wporg-developer

Handbook: Import the post_modified from last Github commit date

Opened this issue · 0 comments

Per #456 the last modified date of github-imported handbooks can be incorrect.

While the above issue has been closed via a once-off fix, we should move forward with querying the last commit upon markdown import, such that the dates (which are now prominently displayed) are accurate.

To make it work with standalone environments, as well as production, we can use a GitHub App if available and fall back to unauthenticated API requests if not. That should likely be enough to mostly-work™ for local testing, while working perfectly in production.

Note: The markdown importer is not contained within this repo, but this is the primary place it's used and this bug is visible. The source is here: https://github.com/WordPress/wordpress.org/tree/trunk/wordpress.org/public_html/wp-content/plugins/wporg-markdown