|
| 1 | +# GitHub Comment Commands |
| 2 | + |
| 3 | +MyCoder provides automated actions in response to `/mycoder` commands in GitHub issue comments. This feature allows you to trigger MyCoder directly from GitHub issues with flexible prompts. |
| 4 | + |
| 5 | +## How to Use |
| 6 | + |
| 7 | +Simply add a comment to any GitHub issue with `/mycoder` followed by your instructions: |
| 8 | + |
| 9 | +``` |
| 10 | +/mycoder [your instructions here] |
| 11 | +``` |
| 12 | + |
| 13 | +MyCoder will process your instructions in the context of the issue and respond accordingly. |
| 14 | + |
| 15 | +## Examples |
| 16 | + |
| 17 | +### Creating a PR |
| 18 | + |
| 19 | +``` |
| 20 | +/mycoder implement a PR for this issue |
| 21 | +``` |
| 22 | + |
| 23 | +MyCoder will: |
| 24 | +1. Check out the repository |
| 25 | +2. Review the issue details |
| 26 | +3. Implement a solution according to the requirements |
| 27 | +4. Create a pull request that addresses the issue |
| 28 | + |
| 29 | +### Creating an Implementation Plan |
| 30 | + |
| 31 | +``` |
| 32 | +/mycoder create an implementation plan for this issue |
| 33 | +``` |
| 34 | + |
| 35 | +MyCoder will: |
| 36 | +1. Review the issue details |
| 37 | +2. Create a comprehensive implementation plan |
| 38 | +3. Post the plan as a comment on the issue |
| 39 | + |
| 40 | +### Other Use Cases |
| 41 | + |
| 42 | +The `/mycoder` command is flexible and can handle various requests: |
| 43 | + |
| 44 | +``` |
| 45 | +/mycoder suggest test cases for this feature |
| 46 | +``` |
| 47 | + |
| 48 | +``` |
| 49 | +/mycoder analyze the performance implications of this change |
| 50 | +``` |
| 51 | + |
| 52 | +``` |
| 53 | +/mycoder recommend libraries we could use for this implementation |
| 54 | +``` |
| 55 | + |
| 56 | +## How It Works |
| 57 | + |
| 58 | +This functionality is implemented as a GitHub Action that runs whenever a new comment is added to an issue. The action checks for the `/mycoder` command pattern and triggers MyCoder with the appropriate instructions. |
| 59 | + |
| 60 | +MyCoder receives context about: |
| 61 | +- The issue number |
| 62 | +- The specific prompt you provided |
| 63 | +- The comment URL where the command was triggered |
| 64 | + |
| 65 | +If MyCoder creates a PR or takes actions outside the scope of the issue, it will report back to the issue with a comment explaining what was done. |
| 66 | + |
| 67 | +## Requirements |
| 68 | + |
| 69 | +For this feature to work in your repository: |
| 70 | + |
| 71 | +1. The GitHub Action workflow must be present in your repository |
| 72 | +2. You need to configure the necessary API keys as GitHub secrets: |
| 73 | + - `GITHUB_TOKEN` (automatically provided) |
| 74 | + - `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `XAI_API_KEY`, or `MISTRAL_API_KEY` (depending on your preferred model) |
| 75 | + |
| 76 | +## Limitations |
| 77 | + |
| 78 | +- The action runs with GitHub's default timeout limits |
| 79 | +- Complex implementations may require multiple iterations |
| 80 | +- The AI model's capabilities determine the quality of the results |
0 commit comments