TechArtists/admin-change-history
Lightweight release management for all internal & external things
Change History Sheet
This is an example model of a sheet that you can manually populate to keep track of changes that affect your business. They can either be app releases, backend relesaes, marketing changes (e.g. incrementing budget, changing visuals), outages, external changes, etc.
To keep things simple to use, it uses two sheets, a "Recent Changes" one, that only contains changes from the last 14 days and a "Historical" one.
You can look at an example template sheet here
π Move "Recent Changes" -> "Historical" Script
This repo has a Python script that moves "old" rows from "Recent Changes" into the a "Historical" sheet.
It identifies old rows by looking at the "Change Timestamp" column and moving those older than 14 days.
It also removes empty rows from the Recent Changes sheet to keep data compact.
π Example Spreadsheet Format
Your Google Spreadsheet must have a sheet named "Recent Changes" with the following columns:
| Product Name | Version | Change Name | Change Details | Change Timestamp | End Change Timestamp | Change Type | Component | Platform | Link | Comments |
|---|---|---|---|---|---|---|---|---|---|---|
| Product Name 1 | 112.12.12 | Testing | 2025-05-01T17:34:00+03:00 | 2025-05-22 | Full Rollout | Marketing | All | |||
| Product Name 2 | Deploying | 2025-03-27 | Full Rollout | Marketing | All |
β
The Change Timestamp column must exist and be in one of these formats:
- ISO 8601:
2025-05-01T17:34:00+03:00or2025-05-01T17:34:00Z - US-style:
05/01/2025 17:34:00
π Script Behavior
- Moves rows from "Recent Changes" to "Historical" if the
Change Timestampis older than 14 days - Keeps the header intact
- Removes gaps in "Recent Changes" by shifting non-empty rows upward
Prerequisites
- Create a Google Service Account. The service account does not need to have any special roles.
- Ensure the Google Cloud Project has the "Google Sheets API" enabled
- Find your Spreadsheet ID for the sheet you want to modify. To find the ID, go to Share -> Copy Link and the id is found between
/d/<ID IS HERE>/edit - Share the spreadsheet with the e-mail of the service account created at 1
π₯ Local Usage
1. Create a .env file
SERVICE_ACCOUNT_JSON=service-account-creds.json
SPREADSHEET_ID=your_spreadsheet_id_here2. Install dependencies
pip install gspread google-auth python-dotenv3. Run the script
python move_old_changes.pyβοΈ GitHub Actions Automation
1. Add Secrets to GitHub
In your GitHub repo β Settings β Secrets and variables β Actions β Add the following:
SERVICE_ACCOUNT_JSONβ paste contents of your service-account-creds.json.SPREADSHEET_IDβ your sheet ID
2. Enable and Run the Workflow
If you've copied or forked this repo, GitHub disables Actions by default. To enable and run the workflow:
- Go to the "Actions" tab of your repository.
- You will see a banner asking if you want to enable workflows β click βI understandβ¦β and Enable.
- You will see a workflow named "Move Old Sheet Rows".
- Click into it, then press "Run workflow" (top-right dropdown) to trigger it manually.
The script will also run automatically every day if the schedule is enabled.