feat: add scripts to retrieve repositories with and without Copilot custom instructions#159
Merged
joshjohanning merged 2 commits intomainfrom Mar 20, 2026
Merged
Conversation
…ustom instructions
Contributor
There was a problem hiding this comment.
Pull request overview
Adds two gh-cli helper scripts to report which organization repositories do or do not contain Copilot custom instruction files, and documents them in the gh-cli script catalog.
Changes:
- Add
get-repositories-with-copilot-instructions.shto list repositories containing.github/copilot-instructions.mdand/or.github/instructions/ - Add
get-repositories-without-copilot-instructions.shto list repositories missing both instruction locations - Update
gh-cli/README.mdwith usage docs for the new scripts
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| gh-cli/get-repositories-with-copilot-instructions.sh | New GraphQL-based detector script (includes tabular TSV output) |
| gh-cli/get-repositories-without-copilot-instructions.sh | New GraphQL-based detector script (outputs repositories missing instruction files) |
| gh-cli/README.md | Adds documentation entries for the two new scripts |
Comments suppressed due to low confidence (1)
gh-cli/get-repositories-with-copilot-instructions.sh:7
- These scripts use the API to list organization repositories and read repository contents, but they don’t document the required
gh authscopes/permissions (for example, needing access to private repositories in the org). Add a short note near the top indicating the expected authentication/scopes (and/or an examplegh auth refreshcommand) so failures are easier to diagnose.
# Get repositories that have Copilot custom instruction files
# Checks for:
# - .github/copilot-instructions.md (repository-wide custom instructions)
# - .github/instructions/ directory (path-specific custom instructions)
#
… Copilot instructions
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.
This pull request adds new scripts and documentation to help identify repositories with or without Copilot custom instruction files in a GitHub organization. The main changes are the introduction of two bash scripts for this purpose, along with updates to the
README.mdto describe their usage.Copilot instruction detection scripts:
get-repositories-with-copilot-instructions.shto list repositories containing either repository-wide (.github/copilot-instructions.md) or path-specific (.github/instructions/) Copilot instruction files, including a formatted output option.get-repositories-without-copilot-instructions.shto list repositories lacking both types of Copilot instruction files.Documentation updates:
gh-cli/README.mdto provide descriptions and usage instructions for the new Copilot instruction detection scripts.