इस प्रोजेक्ट के बारे में
gha-doctor एक कमांड-लाइन टूल है जो शून्य कॉन्फ़िगरेशन के साथ एक कमांड में GitHub Actions वर्कफ़्लो की फ्लैकी जॉब्स, व्यर्थ मिनट्स, धीमे स्टेप्स, कैश समस्याओं और वर्कफ़्लो विरोध-प्रथाओं का निदान करता है। रीडमी इसे actionlint (सटीकता) और zizmor (सुरक्षा) के साथ वर्गीकृत करता है, जो गति, लागत और विश्वसनीयता को कवर करता है। यह静的 चेक के लिए .github/workflows पढ़ता है और run-history विश्लेषण के लिए मौजूदा GITHUB_TOKEN या gh CLI प्रमाणीकरण उपयोग करता है; एक lint-only मोड बिना किसी प्रमाणीकरण के ऑफ़लाइन काम करता है। एक --repo owner/name फ़्लैग API के माध्यम से किसी अन्य रिपॉज़िटरी के वर्कफ़्लो फ़ाइलों और रन इतिहास को खींचता है, इसलिए रिपॉज़िटरी को क्लोन करने की आवश्यकता नहीं है, और --org एक संगठन या उपयोगकर्ता भर से बेड़े ट्रिएज चलाता है।
静的 विश्लेषण 21 दस्तावेज़ीकृत नियमों (D001 से D021) में व्यवस्थित है, जिनमें तीव्रता और पंक्तियों के नंबर होते हैं जो सटीक YAML स्थान की ओर इशारा करते हैं। ये चीज़ों को कवर करते हैं जैसे pull-request वर्कफ़्लो पर cancel-in-progress के साथ अनुपस्थित concurrency, timeout-minutes के बिना जॉब्स, बिल्ट-इन कैश इनपुट के बिना setup-node/setup-python/setup-java, पूरे इतिहास के checkouts, 15 मिनट से अधिक बार crons, हर push पर macOS और Windows राउनर्स, cache-from के बिना docker build-push, restore-keys के बिना actions/cache, जॉब-लेवल continue-on-error, डिफ़ॉल्ट आर्टिफ़ैक्ट रखरखाव, बड़ी मैट्रिक्स, npm ci के बजाय npm install, unscoped push plus pull_request डबल ट्रिगर, मिनिट 0 पर cron, शट-डाउन या निर्वित राउनर लेबल और एक्शन वर्ज़न, अनुपस्थित स्वचालित एक्शन पिप अपडेट, deprecated वर्कफ़्लो कमांड्स, published एक्शन में deprecated Node रंटाइम्स, और repository guard के बिना scheduled वर्कफ़्लो। निष्कर्षों को फ़्लैग की गई पंक्ति पर एक कमेंट के साथ inline या --disable के साथ global रूप से चुप किया जा सकता है, और --explain के साथ हर नियम को ऑफ़लाइन समझाया जा सकता है।
Run-history विश्लेषण फ्लैकी जॉब्स को इस प्रकार खोजता है कि जॉब्स ने उसी कमिट पर failure और pass दोनों दिखाए, per-workflow success rate, p50 और p95 duration, queue time और cost की रिपोर्ट देता है, सबसे धीमे स्टेप्स और व्यर्थ मिनट्स की पहचान करता है, और cache hit/miss rate को माप सकता है और job logs से फ्लैकी टेस्ट के नाम बता सकता है। सब कुछ measure होकर 0 से 100 की itemized health score में बदल जाता है जिसे SVG badge के रूप में लिखा जा सकता है। Output formats में plain text, machine-readable JSON published JSON Schemas के साथ, Markdown, SARIF 2.1.0, inline annotation workflow commands, और inline charts वाला self-contained HTML report शामिल है।
एक auto-fix मोड fixable rules के लिए surgical line edits लागू करता है, एक अलग diff मोड के साथ changes को बिना लिखे preview किया जा सकता है। .gha-doctor.yml या .github/gha-doctor.yml में repository config file policy दर्शाती है जैसे disabled rules, history sample size, log sampling और failure thresholds; explicit CLI flags precede करते हैं और एक no-config flag उसे ignore करता है। Exit code 2 warnings signal करता है ताकि tool CI को gate कर सके, configurable severity gating और minimum health score threshold के साथ।
यह प्रोजेक्ट एक composite GitHub Action के रूप में भी आता है जो release binary इंस्टॉल करता है और args, version, token, job summary, sticky pull-request comments, base branch के खिलाफ baseline diffing, और failure thresholds के लिए inputs support करता है; inline annotations by default on हैं। GitHub Enterprise Server GH_HOST variable के माध्यम से supported है। Model Context Protocol stdio server mode six read-only tools expose करता है (analyze_repo, lint_repo, preview_fixes, run_deep_dive, org_overview, explain_rule) ताकि MCP clients CI health query कर सकें; server official MCP Registry में सूचीबद्ध है और container image से भी चलाया जा सकता है।
Installation options में gh CLI extension, Homebrew, Scoop, distroless multi-arch Docker image, go install, aqua, mise/ubi, asdf, release binaries, deb/rpm/apk packages, shell completions और pre-commit hooks शामिल हैं। एक browser playground WebAssembly के माध्यम से linter और इसके auto-fixes को client-side चलाता है। रीडमी कहती है कि प्रोजेक्ट एक AI agent द्वारा build और maintain किया गया है और tool केवल repositories से पढ़ता है; private-repo use के लिए Actions read और Contents read permissions की आवश्यकता है।
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.