Skip to content

Add GitHub Copilot instructions for repository standards and workflow#13

Open
Copilot wants to merge 5 commits intomainfrom
copilot/setup-copilot-instructions
Open

Add GitHub Copilot instructions for repository standards and workflow#13
Copilot wants to merge 5 commits intomainfrom
copilot/setup-copilot-instructions

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Establishes .github/copilot-instructions.md to guide Copilot contributions with repository-specific standards and patterns.

Changes

  • Code standards: make fmt requirement before commits, build/lint/swagger workflow
  • Repository structure: Documents actual directory layout (cmd/, internal/, pkg/) with verified paths
  • Development guidelines: Go idioms, table-driven tests, Swagger annotations, cloud provider patterns
  • Build system: Clarifies Makefile vs Makefile.new usage, provides manual test commands (go test -v -race ./...)
  • Security & conventions: OWASP guidelines, structured errors, dependency injection patterns

Key Sections

### Required Before Each Commit
- Run `make fmt` before committing any changes

### Go Best Practices
1. Use table-driven tests when possible
2. Use the race detector (`-race` flag)
3. Document public APIs using godoc conventions

### API Development
1. Use Swagger annotations for all HTTP endpoints
2. Run `make swagger` after updating handlers

Instructions reflect the actual codebase structure as an infrastructure auditing platform for AWS, Azure, and GCP.

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>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</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@keploy
Copy link

keploy bot commented Dec 10, 2025

To generate Unit Tests for this PR, please click here.

@keploy-staging
Copy link

To generate Unit Tests for this PR, please click here.

@coderabbitai
Copy link

coderabbitai bot commented Dec 10, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: pratik-mahalle <124587957+pratik-mahalle@users.noreply.github.com>
@pratik-mahalle pratik-mahalle marked this pull request as ready for review December 10, 2025 10:52
Copilot AI and others added 3 commits December 10, 2025 10:53
Co-authored-by: pratik-mahalle <124587957+pratik-mahalle@users.noreply.github.com>
Co-authored-by: pratik-mahalle <124587957+pratik-mahalle@users.noreply.github.com>
Co-authored-by: pratik-mahalle <124587957+pratik-mahalle@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up Copilot instructions for repository Add GitHub Copilot instructions for repository standards and workflow Dec 10, 2025
Copilot AI requested a review from pratik-mahalle December 10, 2025 10:57
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.

✨ Set up Copilot instructions

2 participants