-
Notifications
You must be signed in to change notification settings - Fork 2
Add GitHub Copilot instructions for repository #48
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
Conversation
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
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.
Pull request overview
This PR adds GitHub Copilot instructions to configure the coding agent with repository-specific context for the MageForge project, following GitHub's best practices for Copilot integration.
Key Changes
- Added comprehensive
.github/copilot-instructions.mdfile with Magento 2 module context - Documented coding standards including PHP 8.3+ requirements, PSR-4, strict typing, and constructor property promotion
- Included project-specific conventions for Git workflow, CLI command patterns, and theme builder architecture
| composer create-project magento/magento-coding-standard --stability=dev /tmp/magento-coding-standard | ||
| /tmp/magento-coding-standard/vendor/bin/phpcs -p -s --standard=Magento2 src/ |
Copilot
AI
Dec 12, 2025
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.
The command example shows installing magento-coding-standard to /tmp/ which is a temporary directory that may be cleared on system restart. Consider documenting a more permanent installation location or using a project-local installation method via composer require-dev for better reproducibility.
| composer create-project magento/magento-coding-standard --stability=dev /tmp/magento-coding-standard | |
| /tmp/magento-coding-standard/vendor/bin/phpcs -p -s --standard=Magento2 src/ | |
| composer require --dev magento/magento-coding-standard | |
| vendor/bin/phpcs -p -s --standard=Magento2 src/ |
| ```bash | ||
| composer create-project magento/magento-coding-standard --stability=dev /tmp/magento-coding-standard | ||
| /tmp/magento-coding-standard/vendor/bin/phpcs -p -s --standard=Magento2 src/ | ||
| ``` |
Copilot
AI
Dec 12, 2025
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.
The formatting example shows -p -s flags for phpcs but doesn't explain what these flags do. Consider adding a brief explanation (e.g., "-p shows progress, -s shows sniff codes") to make the documentation more helpful for contributors who may not be familiar with PHPCS.
| ``` |
Note: The
-pflag shows progress, and the-sflag shows sniff codes in the output.
Configures GitHub Copilot coding agent with repository-specific context per best practices.
Changes
.github/copilot-instructions.mdwith:declare(strict_types=1), constructor property promotion withreadonly#<issue> - <message>commit formatService/ThemeBuilder/, Magento DI patterns, CLI command shortcodesThis enables Copilot to generate code consistent with project conventions and understand the Magento 2 module architecture.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.