-
Notifications
You must be signed in to change notification settings - Fork 203
Add comprehensive GitHub Copilot instructions for ORAS CLI development #1820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@TerryHowe 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: TerryHowe <[email protected]>
… reference Co-authored-by: TerryHowe <[email protected]>
Co-authored-by: TerryHowe <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Seems a bit long winded though 🤷
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1820 +/- ##
=======================================
Coverage 85.25% 85.25%
=======================================
Files 143 143
Lines 6739 6739
=======================================
Hits 5745 5745
Misses 706 706
Partials 288 288 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
```bash | ||
make lint # Run golangci-lint | ||
``` | ||
- **KNOWN ISSUE**: golangci-lint may fail with Go 1.25 due to version compatibility: "the Go language version (go1.23) used to build golangci-lint is lower than the targeted Go version (1.25.0)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot This is strange, can we just build it using Go 1.25?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think co-pilot is confused because the action has a go.mod file with 1.23 although I'm pretty sure it is built with1.24 Although 1.24 isn't great either.
- **KNOWN ISSUE**: golangci-lint may fail with Go 1.25 due to version compatibility: "the Go language version (go1.23) used to build golangci-lint is lower than the targeted Go version (1.25.0)" |
It seems we can add more guidelines like the following examples. This is a Go based repository with a Ruby client for certain API endpoints. It is primarily responsible for ingesting metered usage for GitHub and recording that usage. Please follow these guidelines when contributing:
## Code Standards
### Required Before Each Commit
- Run `make fmt` before committing any changes to ensure proper code formatting
- This will run gofmt on all Go files to maintain consistent style
### Development Flow
- Build: `make build`
- Test: `make test`
- Full CI check: `make ci` (includes build, fmt, lint, test)
## Repository Structure
- `cmd/`: Main service entry points and executables
- `internal/`: Logic related to interactions with other GitHub services
- `lib/`: Core Go packages for billing logic
- `admin/`: Admin interface components
- `config/`: Configuration files and templates
- `docs/`: Documentation
- `proto/`: Protocol buffer definitions. Run `make proto` after making updates here.
- `ruby/`: Ruby implementation components. Updates to this folder should include incrementing this version file using semantic versioning: `ruby/lib/billing-platform/version.rb`
- `testing/`: Test helpers and fixtures
## Key Guidelines
1. Follow Go best practices and idiomatic patterns
2. Maintain existing code structure and organization
3. Use dependency injection patterns where appropriate
4. Write unit tests for new functionality. Use table-driven unit tests when possible.
5. Document public APIs and complex logic. Suggest changes to the `docs/` folder when appropriate # Project Overview
This project is a web application that allows users to manage their tasks and to-do lists. It is built using React and Node.js, and uses MongoDB for data storage.
## Folder Structure
- `/src`: Contains the source code for the frontend.
- `/server`: Contains the source code for the Node.js backend.
- `/docs`: Contains documentation for the project, including API specifications and user guides.
## Libraries and Frameworks
- React and Tailwind CSS for the frontend.
- Node.js and Express for the backend.
- MongoDB for data storage.
## Coding Standards
- Use semicolons at the end of each statement.
- Use single quotes for strings.
- Use function based components in React.
- Use arrow functions for callbacks.
## UI guidelines
- A toggle is provided to switch between light and dark mode.
- Application should have a modern and clean design. |
We might need to make some manual adjustments based on this copilot's version. |
This PR adds a comprehensive
.github/copilot-instructions.md
file that provides GitHub Copilot coding agents with detailed instructions for working effectively in the ORAS CLI codebase.What's Included
The instructions file provides:
Essential Development Workflow:
Comprehensive Validation Scenarios:
Critical Timing Information:
Known Issues Documentation:
Quick Reference Section:
Copy-paste ready commands for common development tasks, making it easy for agents to get started immediately.
Validation
Every single command in the instructions has been tested and verified to work correctly. The instructions follow the imperative tone requirement and start with a firm directive to "Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information."
This enables GitHub Copilot agents to work effectively in the codebase without trial-and-error, following validated workflows that mirror how experienced developers work with the ORAS CLI project.
Fixes #1819.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.