Auto update lib status by ShaharNaveh · Pull Request #7074 · RustPython/RustPython
📝 Walkthrough
Walkthrough
Adds a new GitHub Actions workflow that runs on pushes to Lib/** or manual dispatch, clones RustPython and CPython with sparse-checkout, runs a Python-based scripts/update_lib todo update, and edits a specified GitHub issue with the generated body.
Changes
| Cohort / File(s) | Summary |
|---|---|
GitHub Actions Workflow .github/workflows/update-libs-status.yaml |
Adds a workflow triggered on pushes to Lib/** (on main) and workflow_dispatch. Checks out repos (sparse-checkout), sets Python version and ISSUE_ID env vars, writes a preformatted body.txt, runs scripts/update_lib todo, and updates the specified GitHub issue with the produced body. |
Sequence Diagram(s)
sequenceDiagram
participant Trigger as GitHub Event
participant Actions as GitHub Actions
participant RP as RustPython Repo
participant CP as CPython Repo
participant Script as update_lib (Python)
participant API as GitHub Issues API
Trigger->>Actions: push to main (Lib/**) / workflow_dispatch
Actions->>RP: sparse checkout RustPython (clone subset)
Actions->>CP: sparse checkout CPython (clone subset)
Actions->>Script: run `scripts/update_lib todo` (env: PY_VER, ISSUE_ID)
Script->>Actions: output body.txt
Actions->>API: edit issue (ISSUE_ID) with body.txt
API-->>Actions: confirm issue updated
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~12 minutes
Poem
🐰 I hopped through repos, clipped and neat,
Wrote a body, ran the script on repeat,
An issue updated with a cheerful thump—
Libraries tracked with a joyful jump! ✨
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately reflects the main change: introducing a workflow to automatically update the library status tracking issue. |
| Linked Issues check | ✅ Passed | The workflow implements the core requirements from #7061: configurable issue ID, target CPython version support, and updates on Lib changes or schedule. |
| Out of Scope Changes check | ✅ Passed | The pull request only adds the GitHub Actions workflow file directly addressing the automation requirements from issue #7061; no unrelated changes detected. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
No actionable comments were generated in the recent review. 🎉
🧹 Recent nitpick comments
.github/workflows/update-libs-status.yaml (3)
9-9: Consider addingworkflow_dispatchinputs for flexibility.The linked issue (
#7061) mentions supporting configurable target issue ID and CPython version as workflow inputs. Adding optional inputs with defaults matching the current env vars would let maintainers trigger ad-hoc runs against a different issue or version without a code change.Suggested change
workflow_dispatch: + inputs: + python_version: + description: "CPython tag to compare against" + required: false + default: "v3.14.3" + issue_id: + description: "GitHub issue number to update" + required: false + default: "6839"Then reference them as:
env: PYTHON_VERSION: ${{ inputs.python_version || 'v3.14.3' }} ISSUE_ID: ${{ inputs.issue_id || '6839' }}
43-47: Timezone is implicit — fine for display, just noting it's UTC.GitHub Actions runners default to UTC. If the displayed timestamp should be explicit, you could use
date -uor appendUTC, but this is a nit.
81-82: Nosetup-pythonaction — relies on system Python.The
ubuntu-latestrunner ships Python 3.x, but its version can change when GitHub updates the image. Ifscripts/update_librequires a specific minimum Python version or you want reproducibility, consider addingactions/setup-python. Otherwise this is fine for simplicity. Based on learnings, the maintainer prefers keeping workflows simple.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.