Skip to content

feature: Exclude archived repositories from list queries TAROT-3758 - #30

Merged
lolgab merged 2 commits into
masterfrom
exclude-archived-repos
Jul 10, 2026
Merged

feature: Exclude archived repositories from list queries TAROT-3758#30
lolgab merged 2 commits into
masterfrom
exclude-archived-repos

Conversation

@lolgab

@lolgab lolgab commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add isArchived: false to ListOrganizationRepositoriesQuery and ListUserRepositoriesQuery to filter out archived repos from results.

Test plan

  • Run query against real org/user with archived repos, confirm they're excluded.

Add isArchived: false to organization and user repository queries.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request attempts to filter out archived repositories by adding the isArchived: false argument to both the ListOrganizationRepositoriesQuery and ListUserRepositoriesQuery GraphQL queries. However, the repositories field on both the Organization and User types in the GitHub GraphQL schema does not support this argument, which will result in GraphQL validation errors. To resolve this, you should either fetch the isArchived field and filter the results on the client side, or use the search query with archived:false.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

first: $size
after: $page
orderBy: { field: PUSHED_AT, direction: DESC }
isArchived: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The repositories field on the Organization type in the GitHub GraphQL schema does not accept an isArchived argument. Adding isArchived: false here will cause a GraphQL validation error. To filter out archived repositories, you must either fetch the isArchived field and filter them on the client side, or use the search query with archived:false.

after: $page
affiliations: [ OWNER ]
orderBy: { field: PUSHED_AT, direction: DESC }
isArchived: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The repositories field on the User type in the GitHub GraphQL schema does not accept an isArchived argument. Adding isArchived: false here will cause a GraphQL validation error. To filter out archived repositories, you must either fetch the isArchived field and filter them on the client side, or use the search query with archived:false.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

The PR successfully implements the filtering logic to exclude archived repositories from organization and user-level GraphQL queries, aligning with the stated intent. Codacy analysis marks the PR as 'up to standards', although it notes that coverage requirements are missing for the new logic.

The primary concern is the lack of automated test coverage. Relying solely on manual verification for query logic introduces a risk of regression, especially as the repository structure or GraphQL schema evolves. It is recommended to implement automated integration tests to verify the exclusion logic before merging.

About this PR

  • The PR lacks automated integration tests to verify that the GraphQL query filters correctly exclude archived repositories. Relying on manual verification is insufficient for core listing logic; please add unit or integration tests to confirm the behavior for both organization and user repository queries.

Test suggestions

  • Verify ListOrganizationRepositoriesQuery excludes repositories where isArchived is true.
  • Verify ListUserRepositoriesQuery excludes repositories where isArchived is true.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify ListOrganizationRepositoriesQuery excludes repositories where isArchived is true.
2. Verify ListUserRepositoriesQuery excludes repositories where isArchived is true.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

@lolgab lolgab changed the title Exclude archived repositories from list queries feature: Exclude archived repositories from list queries TAROT-3758 Jul 10, 2026
@lolgab

lolgab commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@lolgab
lolgab merged commit b645291 into master Jul 10, 2026
4 checks passed
@lolgab
lolgab deleted the exclude-archived-repos branch July 10, 2026 09:18
@lolgab
lolgab restored the exclude-archived-repos branch July 10, 2026 09:27
@lolgab
lolgab deleted the exclude-archived-repos branch July 10, 2026 09:31
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.

2 participants