♻️ refactor: migrate approval automation from JavaScript to Python with Click CLI#88
Open
kenibrewer wants to merge 2 commits intomainfrom
Open
♻️ refactor: migrate approval automation from JavaScript to Python with Click CLI#88kenibrewer wants to merge 2 commits intomainfrom
kenibrewer wants to merge 2 commits intomainfrom
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 <noreply@anthropic.com>
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 │ │
ewels
reviewed
Sep 26, 2025
| 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" |
ewels
reviewed
Sep 26, 2025
Comment on lines
+6
to
+7
| sys.path.insert(0, str(Path(__file__).parent.parent)) | ||
| from approval import ApprovalManager |
Member
There was a problem hiding this comment.
Can't you just do this as a file path import?
ewels
approved these changes
Sep 26, 2025
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
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.pyapproval.test.js→test_approval.pyworkflow-integration.test.js→ integrated into pytest suitepackage.json+package-lock.json→pyproject.toml+uv.lockAdded (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:
.gitignorefor Python artifactsTest Plan
Breaking Changes
None - The automation functionality remains identical from an end-user perspective. Team members still use
/approveand/rejectcommands exactly as before.🤖 Generated with Claude Code