Fix repo-consistency agent fetching oldest PRs instead of most recently merged#74
Merged
Malcolmnixon merged 2 commits intomainfrom Mar 24, 2026
Merged
Conversation
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> Agent-Logs-Url: https://github.com/demaconsulting/TemplateDotNetTool/sessions/07906022-1444-471d-ab4a-38d20e34613e
Copilot
AI
changed the title
[WIP] Merge pull request #65 from demaconsulting/TemplateDotNetLibrary
Fix repo-consistency agent fetching oldest PRs instead of most recently merged
Mar 24, 2026
Malcolmnixon
approved these changes
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the repo-consistency agent instructions to ensure it analyzes recent template changes by fetching the most recently merged PRs rather than the oldest merged PRs (caused by GitHub search default sort behavior).
Changes:
- Update the GitHub search query in the agent instructions to include
sort:updated-desc. - Clarify the step wording to explicitly state “20 most recently merged PRs”.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request
Description
The repo-consistency agent was fetching the 20 oldest merged PRs due to GitHub's search API defaulting to ascending order when no sort is specified. Ports the fix from TemplateDotNetLibrary#65.
Change in
.github/agents/repo-consistency.agent.md:sort:updated-descis the best available proxy for merge recency since GitHub's search API has nosort:mergedqualifier — merging a PR always updates itsupdated_attimestamp.Type of Change
Related Issues
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
dotnet build --configuration Releasedotnet test --configuration Releasedotnet run --project src/DemaConsulting.TemplateDotNetTool --configuration Release --framework net10.0--no-build -- --validateCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
./lint.sh(Unix/macOS) orcmd /c lint.bat/./lint.bat(Windows)Testing
Documentation
Additional Notes
Agent-only file change; no build, test, or code artifacts affected.
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://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1108766/chrome-linux.zip/home/REDACTED/work/_temp/ghcca-node/node/bin/node node install.js(http block)If you need me to access, download, or install something from one of these locations, you can either:
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.