-
Notifications
You must be signed in to change notification settings - Fork 3
♻️ refactor: migrate approval automation from JavaScript to Python with Click CLI #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified FilesNo covered modified files...
|
0f6d608
to
8a300be
Compare
…th Click CLI - Convert ApprovalManager class from JavaScript to Python using PyGithub - Replace Node.js dependencies with Python uv environment management - Implement Click-based CLI interfaces for all three approval types: - SIG proposals: requires 2 core team approvals - RFC proposals: requires core team quorum - Pipeline proposals: requires 2 core OR 1 core + 1 maintainer - Migrate Jest test suite to pytest with comprehensive coverage (21/21 tests) - Update GitHub Actions workflows to use Python scripts with CLI parameters - Replace package.json with pyproject.toml for modern Python packaging - Update documentation to reflect Python-based automation system 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
8a300be
to
f9f9125
Compare
│ │ │ - Replace click dependency with rich-click for enhanced user experience │ │ - Update all CLI scripts to use rich_click as click import │ │ - Makes @ewels happy │ │
body += f"Current approvals: {len(approval_manager.core_approvals)}/{required_core_approvals}\n\n" | ||
|
||
if approvers or rejecters or awaiting: | ||
body += "|Review Status|Core Team members|\n|--|--|\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed a chance to use rich tables here! 😉
sys.path.insert(0, str(Path(__file__).parent.parent)) | ||
from approval import ApprovalManager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just do this as a file path import?
Summary
This PR completely migrates the GitHub approval automation system from JavaScript/Node.js to Python with Click-based CLI interfaces.
Key Changes
Files Changed
Removed (JavaScript/Node.js):
approval.js
→approval.py
approval.test.js
→test_approval.py
workflow-integration.test.js
→ integrated into pytest suitepackage.json
+package-lock.json
→pyproject.toml
+uv.lock
Added (Python/Click):
approval.py
- Core ApprovalManager class using PyGithubscripts/
- Click CLI scripts for each proposal typetests/
- Comprehensive pytest test suitepyproject.toml
- Modern Python package configurationUpdated:
.gitignore
for Python artifactsTest Plan
Breaking Changes
None - The automation functionality remains identical from an end-user perspective. Team members still use
/approve
and/reject
commands exactly as before.🤖 Generated with Claude Code