Skip to content

Fix repo-consistency agent fetching oldest PRs instead of most recently merged#74

Merged
Malcolmnixon merged 2 commits intomainfrom
copilot/merge-pull-request-65
Mar 24, 2026
Merged

Fix repo-consistency agent fetching oldest PRs instead of most recently merged#74
Malcolmnixon merged 2 commits intomainfrom
copilot/merge-pull-request-65

Conversation

Copy link
Contributor

Copilot AI commented Mar 24, 2026

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:

-1. Fetch the last 20 merged PRs (`is:pr is:merged`) from ...
+1. Fetch the 20 most recently merged PRs (`is:pr is:merged sort:updated-desc`) from ...

sort:updated-desc is the best available proxy for merge recency since GitHub's search API has no sort:merged qualifier — merging a PR always updates its updated_at timestamp.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Pre-Submission Checklist

Before submitting this pull request, ensure you have completed the following:

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All unit tests pass: dotnet test --configuration Release
  • Self-validation tests pass:
    dotnet run --project src/DemaConsulting.TemplateDotNetTool --configuration Release --framework net10.0
    --no-build -- --validate
  • Code produces zero warnings

Code Quality

  • Code formatting is correct: dotnet format --verify-no-changes
  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

Please run the following checks before submitting:

  • All linters pass: ./lint.sh (Unix/macOS) or cmd /c lint.bat / ./lint.bat (Windows)

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

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
    • Triggering command: /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.

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
Copilot AI requested a review from Malcolmnixon March 24, 2026 12:48
@Malcolmnixon Malcolmnixon marked this pull request as ready for review March 24, 2026 12:51
Copilot AI review requested due to automatic review settings March 24, 2026 12:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Malcolmnixon Malcolmnixon merged commit 65b0d49 into main Mar 24, 2026
19 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/merge-pull-request-65 branch March 24, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants