Centralize GH CLI timeout constant across maintenance scripts (#936)#1178
Centralize GH CLI timeout constant across maintenance scripts (#936)#1178yanyishuai wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 28 minutes Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable usage-based reviews in Billing to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information, and refer to the rate limits docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
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 |
qingfeng312
left a comment
There was a problem hiding this comment.
CI is failing during pytest collection because the new timeout helper module is not present where the changed scripts import it.
tests/test_submission_quality_gate.py imports scripts.submission_quality_gate, which now imports from scripts.public_payment_language, but that module is missing in this PR's checked-out tree. The workflow stops with:
ModuleNotFoundError: No module named 'scripts.public_payment_language'
Please include the missing module, or update the imports so the test suite can collect successfully.
Evidence: GitHub Actions run 28344111604, job 83964056348, collection interrupted with 1 error.
b64f49a to
dfbdf46
Compare
dfbdf46 to
fdba69b
Compare
|
@qingfeng312 Rebuilt this branch from
Latest head: |
|
@qingfeng312 CI is green on the latest head ( |
1 similar comment
|
@qingfeng312 CI is green on the latest head ( |
qingfeng312
left a comment
There was a problem hiding this comment.
Follow-up on current head fdba69b11a67eaef982c56e157a4cce444af2fd4.
The earlier missing-module collection blocker has been resolved. I rechecked the new scripts/gh_cli_constants.py helper and the maintenance scripts migrated to use the shared GH_TIMEOUT_SECONDS value.
The branch is now self-contained, limits itself to the timeout-constant refactor plus the subprocess help bootstrap cleanup, and adds focused coverage for the constant.
Validation checked: GitHub CI Quality, readiness, docs, and image checks passed on run 28350097261; CodeRabbit status is success on this head. I did not find a remaining blocker for the scoped #936 change.
Summary
Centralizes the duplicated
GH_TIMEOUT_SECONDS = 30literal used across seven read-only GitHub CLI maintenance scripts intoscripts/gh_cli_constants.py.Why
Several maintenance scripts already share safety-cap and JSON-shape helpers; the timeout constant was still duplicated by hand. A single module reduces drift when the timeout policy changes.
Tests
Existing script behavior is unchanged aside from the shared import.
Wallet
Do4v7foHJvRJLpRRoGaVPWX6DDEjX3yTK7J91gpwUQpECloses #936