Automated CI linter failure monitoring and copilot engagement#63
Open
Automated CI linter failure monitoring and copilot engagement#63
Conversation
|
|
- Add PrCheck database model for tracking CI check status - Add check_api utility functions for GitHub check runs - Update webhook handler to process check_run and check_suite events - Implement automatic copilot tagging on linter failures - Add retry tracking (max 3 attempts) - Enable automatic code review for human-created PRs Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
- Add API endpoints to query PR check records - Add comprehensive documentation in CI_MONITORING.md - Document webhook setup, configuration, and usage examples Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
- Define MaxCheckFailureTextLength, CopilotUsername, and MaxFixAttempts as constants - Update all usages to reference the constants - Update documentation to reflect configurability - Improve code maintainability Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
- Modify IncrementFixAttempts to return updated PrCheck object - Eliminate redundant GetPrCheck calls after IncrementFixAttempts - Initialize result variable to false in WebhookOpen - Reduce database round trips for better performance Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix linter error handling in pull requests
Automated CI linter failure monitoring and copilot engagement
Jan 25, 2026
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.
Monitors CI check runs via GitHub webhooks and automatically engages copilot to fix linter failures. Tracks retry attempts per check to prevent infinite loops when fixes fail repeatedly.
Implementation
Database Model (
object/pr_check.go)PrChecktable tracks check status, failure details, and fix attempt count per PR/checkIncrementFixAttempts()returns updated record to eliminate redundant queriesShouldAttemptFix()enforces configurable retry limit (default: 3)Webhook Handler (
controllers/webhook.go)X-GitHub-Eventheader:check_run,check_suite,pull_requestHandleCheckRunEvent()/HandleCheckSuiteEvent()process completed checksGitHub API (
util/check_api.go)API Endpoints (
controllers/pr_check.go)GET /api/get-pr-checks- query all checks for a PRGET /api/get-pr-check- query specific check detailsAutomatic Review
PullRequestOpen()requests @copilot review on all human-created PRsWebhook Configuration
Subscribe to:
pull_request,check_run,check_suiteeventsPayload URL:
https://<domain>/api/webhookFull setup documentation in
CI_MONITORING.md.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/orgs/casbin/repos/tmp/go-build1171290187/b447/util.test /tmp/go-build1171290187/b447/util.test -test.testlogfile=/tmp/go-build1171290187/b447/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true g_.a 2124738/b141/ ux_amd64/vet /tmp/ccqUyMVU.s -c=4(http block)location-readonly.aliyuncs.com/tmp/go-build1171290187/b434/cloud.test /tmp/go-build1171290187/b434/cloud.test -test.testlogfile=/tmp/go-build1171290187/b434/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true --64 2124738/b141/ ux_amd64/vet /tmp/ccCEbeex.s -c=4 -nolocalimports ux_amd64/vet x64/�� ache/go/1.24.12/x64/src/os/user =0 ux_amd64/compile --gdwarf-5 --64 -o ux_amd64/compile-buildtags(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.