منصوبے کے بارے میں
gha-doctor ایک command-line ٹول ہے جو zero configuration کے ساتھ ایک کامند میں GitHub Actions ورکفلوؤں کی flaky jobs, wasted minutes, slow steps, cache problems اور workflow anti-patterns کی تشخیص کرتا ہے۔ README اس کو actionlint (correctness) اور zizmor (security) کے ساتھ جگہ دیتا ہے تاکہ رفتار، لاگت اور قابل اعتمادگی کو کバー کیا جا سکے۔ یہ .github/workflows کو پڑھتا ہے static checks کے لیے اور run-history analysis کے لیے موجودہ GITHUB_TOKEN یا gh CLI authentication استعمال کرتا ہے؛ lint-only mode آفلائن کام کرتا ہے اور کوئیauthentication ضروری نہیں۔ --repo owner/name flalg ایک دیگر ریپوزٹری کے ورکفلو فائلز اور run history کو API کے ذریعے fetch کرتا ہے، اس لیے ریپوزٹری کلون کرنے کی ضرورت نہیں ہوتی، اور --org ایک organisation یا user کے całے fleet پر triage چلاتا ہے۔Static analysis 21 documented rules (D001 tak D021) میں organización کردہ ہے جن میں severities اور line numbers دیے گئے ہیں جو exact YAML location کی طرف اشارہ کرتے ہیں۔ ان rules میں شامل ہیں: pull-request ورکفلوؤں پر cancel-in-progress کے ساتھ missing concurrency, jobs bina timeout-minutes, setup-node/setup-python/setup-java bina built-in cache input, full-history checkouts, 15 منٹ سے زیادہ بار repeating crons, har push پر macOS اور Windows runners, docker build-push bina cache-from, actions/cache bina restore-keys, job-level continue-on-error, default artifact retention, بڑے matrices, npm ci کی جگہ npm install, unscoped push plus pull_request double triggers, minute 0 پر cron, band ya retir کردہ runner labels اور action versions, missing automated action pin updates, deprecated workflow commands, published actions میں deprecated Node runtimes, اور repository guard bina scheduled workflows۔ Flagged line پر comment کے ذریعے inline ya globally --disable کے ذریعے findings ko silent کیا جا سکتا ہے، اور har rule ko --explain کے ساتھ offline explain کیا جا سکتا ہے۔Run-history analysis flaky jobs ko detect karti hai woh jobs jo aik hi commit par dono fail aur pass karti hain, per-workflow success rate, p50 aur p95 durations, queue time aur cost report karti hai, sab se slow steps aur wasted minutes identify karti hai, aur job logs se cache hit/miss rates measure karti hai aur flaky tests ka naam deti hai. Sab kuch measured ko itemised 0 se 100 tak health score mein roll up kiya ja sakta hai jo SVG badge ke likha ja sakta hai. Output formats plain text, machine-readable JSON (JSON Schemas ke saath), Markdown, SARIF 2.1.0, inline annotation workflow commands, aur self-contained HTML report jisme inline charts hon.Auto-fix mode fixable rules ke liye surgical line edits apply karta hai, aur alag diff mode changes ko likh bina preview karta hai. Repository config file .gha-doctor.yml ya .github/gha-doctor.yml mein policy bataya ja sakta hai jaise disabled rules, history sample size, log sampling, failure thresholds; explicit CLI flags precedence rakhte hain aur no-config flag use karne par config ignore hota hai. Exit code 2 warnings signal karta hai taake tool CI ko gate kar sake, configurable severity gating aur minimum health score threshold ke saath.Projekt ek composite GitHub Action ke saath bhi ship karta hai jo release binary install karta hai aur args, version, token, job summary, sticky pull-request comments, base branch ke khilaf baseline diffing, aur failure thresholds ke liye inputs support karta hai; inline annotations default par on hain. GitHub Enterprise Server ko GH_HOST variable ke zariye support kiya jata hai. Model Context Protocol stdio server mode saat read-only tools (analyze_repo, lint_repo, preview_fixes, run_deep_dive, org_overview, explain_rule) exhibit karta hai taake MCP clients CI health query kar sake; server official MCP Registry mein list hai aur container image se bhi chalaya ja sakta hai.Installation ke options mein gh CLI extension, Homebrew, Scoop, distroless multi-arch Docker image, go install, aqua, mise/ubi, asdf, release binaries, deb/rpm/apk packages, shell completions, aur pre-commit hooks shamil hain. Browser playground WebAssembly ke zariye linter aur uske auto-fixes ko client-side chalata hai. README ke mutabiq projekt ek AI agent ke dwara build aur maintain karta hai aur tool sirf repositories se hi padhta hai; private-repo use ke liye Actions read aur Contents read permissions ki zaroorat hoti hai.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.