Skip to content

feat: add scripts to retrieve repositories with and without Copilot custom instructions#159

Merged
joshjohanning merged 2 commits intomainfrom
copilot-instruction-scripts
Mar 20, 2026
Merged

feat: add scripts to retrieve repositories with and without Copilot custom instructions#159
joshjohanning merged 2 commits intomainfrom
copilot-instruction-scripts

Conversation

@joshjohanning
Copy link
Copy Markdown
Owner

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.md to describe their usage.

Copilot instruction detection scripts:

  • Added get-repositories-with-copilot-instructions.sh to list repositories containing either repository-wide (.github/copilot-instructions.md) or path-specific (.github/instructions/) Copilot instruction files, including a formatted output option.
  • Added get-repositories-without-copilot-instructions.sh to list repositories lacking both types of Copilot instruction files.

Documentation updates:

  • Updated gh-cli/README.md to provide descriptions and usage instructions for the new Copilot instruction detection scripts.

Copilot AI review requested due to automatic review settings March 20, 2026 03:11
Copy link
Copy Markdown
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

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.sh to list repositories containing .github/copilot-instructions.md and/or .github/instructions/
  • Add get-repositories-without-copilot-instructions.sh to list repositories missing both instruction locations
  • Update gh-cli/README.md with 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 auth scopes/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 example gh auth refresh command) 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)
#

Comment thread gh-cli/README.md Outdated
Comment thread gh-cli/get-repositories-with-copilot-instructions.sh Outdated
Comment thread gh-cli/get-repositories-without-copilot-instructions.sh
@joshjohanning joshjohanning merged commit 832d064 into main Mar 20, 2026
5 checks passed
@joshjohanning joshjohanning deleted the copilot-instruction-scripts branch March 20, 2026 03:21
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