-
Notifications
You must be signed in to change notification settings - Fork 36
[jsweep] Clean check_permissions_utils.cjs #7985
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
Conversation
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
Smoke Test Results✅ File Writing: Created Status: FAIL (safeinputs-gh tool missing)
|
|
PRs: feat: add support for campaign objectives and kpis; chore: fix formatting issues in devcontainer and test files
|
Smoke Test Results (Copilot, No Firewall)Last 2 Merged PRs:
Test Results:
Overall Status: PASS
|
Smoke Test Results - Copilot EngineLast 2 Merged PRs:
Test Results:
Available Tools: github-search_pull_requests, github-get_commit, github-get_file_contents, github-list_branches, github-list_commits, github-list_issues, github-issue_read, github-list_pull_requests, github-pull_request_read, github-search_issues, github-search_code, github-search_repositories, safeoutputs-add_comment, safeoutputs-add_labels, safeoutputs-create_issue, safeoutputs-missing_tool, safeoutputs-noop Overall Status: PASS (MCP gateway not configured for this workflow) cc
|
Smoke Test Results (Run 20556122427)
Overall: FAIL - Core tools unavailable in this workflow environment
|
|
Recent merged PRs: feat: add support for campaign objectives and kpis; chore: fix formatting issues in devcontainer and test files
|
Smoke Test Results - Claude EngineLast 2 Merged PRs:
Test Results:
Overall Status: PASS (5/6 tests passed - gh auth expected to fail)
|
|
@copilot format and lint |
|
@copilot format, lint js, lint go |
Summary
Cleaned and modernized
check_permissions_utils.cjsto use modern JavaScript patterns and significantly improved test coverage.Code Improvements
Modernization
filter(p => p.trim() !== '')with more concisefilter(p => p.trim())in bothparseRequiredPermissions()andparseAllowedBots()?.and??operators to eliminate intermediate variables and simplify null checksforloop with.some()method incheckRepositoryPermission()for cleaner, more functional permission checkingbotError?.status === 404)permission: permission→permission)Error Handling Pattern
Consistently applied modern error handling pattern throughout:
Test Improvements
Coverage Expansion
New Test Coverage
parseAllowedBots() - 6 new tests
checkBotStatus() - 7 new tests
[bot]suffixTest Infrastructure Improvements
beforeEachto import and assign all module functionsGH_AW_REQUIRED_ROLESandGH_AW_ALLOWED_BOTSContext
core,githubglobals)check_permissions.cjsandcheck_membership.cjsValidation
The changes maintain all original functionality while improving:
All logic remains identical - only the implementation is cleaner and more thoroughly tested.