ci: rewrite deploy scripts with python3#7152
Open
ElectricalBoy wants to merge 56 commits intoLiquipedia:mainfrom
Open
ci: rewrite deploy scripts with python3#7152ElectricalBoy wants to merge 56 commits intoLiquipedia:mainfrom
ElectricalBoy wants to merge 56 commits intoLiquipedia:mainfrom
Conversation
Co-authored-by: SyntacticSalt <mail@mbergen.de>
99d8500 to
fc35084
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Rewrites the repo’s CI deploy/protect/remove scripts from Bash to Python (shared helpers in scripts/deploy_util.py) and updates GitHub Actions workflows to run the new Python entrypoints.
Changes:
- Replace Bash deploy/protect/remove/login scripts with Python equivalents using
requests+ cookie jars. - Add shared deploy utilities (
deploy_util.py) and a new Python style workflow (pythoncheck.yml). - Update CI workflows to set up Python, install dependencies, and call the new Python scripts; add gitignore entries for Python/cookie artifacts.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/remove_dev.sh | Removes legacy Bash dev-env cleanup script |
| scripts/remove_dev.py | New Python dev-env cleanup script |
| scripts/protect_templates.sh | Removes legacy Bash template protection script |
| scripts/protect_templates.py | New Python template protection script |
| scripts/protect_page.sh | Removes legacy Bash protect-page helpers |
| scripts/protect_page.py | New Python protect-page helpers and error aggregation |
| scripts/protect.sh | Removes legacy Bash module protection script |
| scripts/protect.py | New Python module protection script |
| scripts/login_and_get_token.sh | Removes legacy Bash login/token script |
| scripts/login_and_get_token.py | New Python login/token helpers with caching |
| scripts/deploy_res.sh | Removes legacy Bash resource deploy script |
| scripts/deploy_res.py | New Python resource deploy + cache update script |
| scripts/deploy.sh | Removes legacy Bash Lua deploy script |
| scripts/deploy.py | New Python Lua deploy script |
| scripts/deploy_util.py | Shared helpers for wiki URL, deploy calls, cookies, summary output |
| .github/workflows/scheduled.yml | Switch scheduled deploy to Python scripts + setup/install |
| .github/workflows/deploy.yml | Switch deploy workflow to Python scripts + setup/install |
| .github/workflows/pythoncheck.yml | Add Ruff lint/format CI for scripts |
| .vscode/settings.json | Configure Python env file usage for local dev |
| .gitignore | Ignore Python caches, .env, and cookie files |
Comments suppressed due to low confidence (2)
scripts/deploy_res.py:4
sysis imported but never used in this file, which will fail the new Ruff linting workflow. Remove the unused import (or use it if intended).
import itertools
import pathlib
import sys
import subprocess
.vscode/settings.json:16
- Indentation in
.vscode/settings.jsonis currently tab-based, but the newly addedpython.terminal.useEnvFileline is indented with spaces. Re-indent it to match the surrounding style so diffs stay clean.
"python.envFile": "${workspaceFolder}/.env",
"python.terminal.useEnvFile": true,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
FO-nTTaX
approved these changes
Mar 2, 2026
Member
FO-nTTaX
left a comment
There was a problem hiding this comment.
I don't have the time to do a line by line check, however there's nothing clearly wrong. On the assumption you have tested this LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Previous discussion: https://discord.com/channels/321003439431745537/321641940879802368/1468407645391163432
Previous PR: #7046
This PR rewrites shellscript versions of current deploy scripts with Python.
How did you test this change?