Skip to content

Remove isRepo negative-test exception and use aliases in test array#247

Open
Copilot wants to merge 2 commits intomainfrom
copilot/remove-exception-and-clean-url-array
Open

Remove isRepo negative-test exception and use aliases in test array#247
Copilot wants to merge 2 commits intomainfrom
copilot/remove-exception-and-clean-url-array

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

  • Update isRepo test array in index.ts with comprehensive aliases for all subset detections
  • Remove the isRepo negative-test exception in index.test.ts (lines 57-59)
  • Run tests to verify all pass (18073 tests)
  • Graph showing all isRepo subsets visually (see below)
  • Fix lint (xo --fix)

isRepo subset graph

graph TD
    isRepo --> isRepoGitObject
    isRepoGitObject --> isRepoTree
    isRepoGitObject --> isSingleFile
    isRepoGitObject --> isBlame
    isRepoTree --> isRepoRoot
    isRepoRoot --> isRepoHome
    isSingleFile --> isRenderedTextFile

    isRepo --> isSingleCommit
    isRepo --> isRepoCommitList
    isRepo --> isCompare
    isCompare --> isQuickPR

    isRepo --> isIssue
    isRepo --> isNewIssue
    isRepo --> isLabelList
    isRepo --> isMilestone
    isRepo --> isMilestoneList
    isRepo --> isNewFile
    isRepo --> isNewRelease

    isRepo --> isPR
    isPR --> isPRConversation
    isPR --> isPRFiles
    isPR --> isPRCommitList
    isPRFiles --> isPRCommit
    isRepo --> isPRConflicts

    isRepo --> isReleases
    isRepo --> isTags
    isRepo --> isSingleReleaseOrTag

    isRepo --> isDeletingFile
    isRepo --> isEditingFile
    isRepo --> isEditingRelease

    isRepo --> isRepoWiki
    isRepoWiki --> isNewWikiPage
    isRepoWiki --> isEditingWikiPage
    isRepoWiki --> isCompareWikiPage

    isRepo --> isRepoPRList
    isRepo --> isRepoIssueList
    isRepo --> isRepoTaxonomyIssueOrPRList
    isRepo --> isProjects

    isRepo --> isRepoSearch
    isRepo --> isRepoSettings
    isRepoSettings --> isRepoMainSettings

    isRepo --> isFileFinder
    isRepo --> isRepoForksList
    isRepo --> isRepoNetworkGraph
    isRepo --> isForkingRepo
    isRepo --> isBranches

    isRepo --> isActionRun
    isActionRun --> isActionJobRun
    isRepo --> isNewAction
    isRepo --> isRepositoryActions
Loading

Comment thread index.ts
'isRepositoryActions',
'isSingleCommit',
'isSingleReleaseOrTag',
'isTags',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Holy cow that's a lot 😂 but better than repeating all the URLs.

Not sure if it's worth removing the exception… but having no exceptions is always better.

@fregante fregante marked this pull request as ready for review April 15, 2026 18:20
Comment thread index.ts
'isRepoSearch',
'isRepoSettings', // Includes isRepoMainSettings
'isRepoTaxonomyIssueOrPRList',
'isRepoWiki', // Includes isNewWikiPage, isEditingWikiPage, isCompareWikiPage
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These comments are not required and they don't have to be kept up to date, but it's good to have them as a sanity check in the future.

LLMs are good at keeping these lists up to date anyway.

@fregante
Copy link
Copy Markdown
Member

@copilot fix the lint step too. Run xo --fix

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 15, 2026

@copilot fix the lint step too. Run xo --fix

Fixed in 67e5824. xo --fix removed a redundant eslint-disable comment and capitalised the from in inline comments.

Copilot AI requested a review from fregante April 15, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants