| sidebar_position | 2 |
|---|
MyCoder's GitHub mode integrates AI-powered coding assistance directly with your GitHub workflow. When enabled, MyCoder can work with issues, create branches, make commits, and open pull requests as part of its operation.
Before using GitHub mode, you need:
-
The GitHub CLI (
gh) installed and authenticated# Install GitHub CLI # macOS brew install gh # Windows winget install --id GitHub.cli # Ubuntu/Debian sudo apt install gh
-
Authenticate with GitHub
gh auth login
Enable GitHub mode using the configuration file:
// mycoder.config.js
export default {
githubMode: true,
};Or use it for a single session:
mycoder --githubMode true "Fix the bug described in issue #42"When GitHub mode is enabled, MyCoder will:
MyCoder can read existing issues, create new ones, and mark them as completed:
# Work on an existing issue
mycoder "Fix issue #42"
# Create a new issue
mycoder "Create an issue for the memory leak in the cache system"MyCoder automatically creates appropriately named branches when working on issues:
# Example branch names
fix/issue-42-memory-leak
feature/add-dark-mode
refactor/improve-error-handling
MyCoder creates commits with detailed, descriptive messages that explain the changes:
# Example commit message
Fix memory leak in cache system (#42)
- Added proper cleanup of cached objects in the dispose method
- Implemented weak references for large objects
- Added unit tests to verify memory is properly released
When work is complete, MyCoder can create pull requests with:
- Descriptive title
- Detailed description of changes
- Reference to the original issue
- Test results and validation steps
Here's an example of how GitHub mode works in practice:
-
Start with an issue (existing or new)
mycoder "Create an issue for implementing dark mode" -
Work on the issue
mycoder "Implement the dark mode feature described in issue #53" -
MyCoder will:
- Create a branch like
feature/issue-53-dark-mode - Make necessary code changes
- Commit changes with descriptive messages
- Create a pull request when complete
- Create a branch like
MyCoder respects your repository's PR templates. If you have a .github/PULL_REQUEST_TEMPLATE.md file, MyCoder will use it when creating PRs.
MyCoder works in the current git repository. To work with multiple repositories, simply navigate to the appropriate directory before running MyCoder.
If your team uses a complex GitHub workflow (e.g., with code owners, required reviews, or CI gates), MyCoder will create the PR according to your repository's requirements, but you'll need to handle the review and merge process manually.
- Authentication Problems: Ensure you've run
gh auth loginsuccessfully - Permission Issues: Verify you have write access to the repository
- Branch Protection: Some repositories have branch protection rules that may prevent direct pushes
If you encounter any issues with GitHub mode, you can check the GitHub CLI status with:
gh auth statusFor persistent problems, please report them on our Discord server.