Simple tooling that turns your Git history into a readable update log, keeps docs/commit-history.md fresh, and (optionally) mirrors the same text into Google Docs.
scripts/generate_commit_history.pyrunsgit logand writes a plain-English summary todocs/commit-history.md.- A GitHub Action (
.github/workflows/update-commit-history.yml) runs on pushes tomain/master, nightly at 03:00 UTC, or on demand. It regenerates the log and commits/pushes changes automatically. - If the secrets
GOOGLE_DOC_IDandGOOGLE_SERVICE_ACCOUNT_JSONexist, the workflow (or a local run ofscripts/push_to_google_docs.py) also updates the linked Google Doc.
git clone https://github.com/Chndr-3/commit-to-docs.git
cd commit-to-docs
python3 scripts/generate_commit_history.pyYou’ll find the latest summary in docs/commit-history.md.
- Enable the Google Docs API and create a service account.
- Share the target Google Doc with the service account email.
- Add repo secrets:
GOOGLE_DOC_ID– from the doc URL (/d/<id>/).GOOGLE_SERVICE_ACCOUNT_JSON– service account key JSON (raw or base64).
Local test:
pip install google-api-python-client google-auth-httplib2
export GOOGLE_DOC_ID="<doc-id>"
export GOOGLE_SERVICE_ACCOUNT_JSON="$(base64 -i path/to/service-account.json)"
python3 scripts/generate_commit_history.py
python3 scripts/push_to_google_docs.pyNeed more detail? Check docs/google-docs-sync.md.
- Pull with
git pull --rebase origin master(ormain) to keep history clean. - Regenerate the log before pushing so the workflow doesn’t create extra commits.
- The workflow uses the default
GITHUB_TOKEN; no extra PAT needed.
Want to see the end result? Here’s a sample Google Doc generated by this setup: Project Update Log Example.