Overview
What it does
- Repository management and code browsing
- Issue tracking and creation
- Pull request management and code review
- Branch and commit operations
- GitHub Actions workflow monitoring
- Code search across repositories
- Security alerts and code scanning
- Dependabot integration
- Team collaboration and discussions
- Project board management
- Release and tag management
- Gist creation and management
- Notifications management
Use Cases
- Automated issue triage and assignment
- Pull request review and approval automation
- Release management and changelog generation
- Code quality monitoring and reporting
- Team productivity analytics
- Documentation updates and maintenance
- Bug tracking and resolution
- Project status reporting
- Security alert monitoring
- Dependabot vulnerability tracking
- Code scanning results analysis
- Secret scanning alerts
Quick Start
Prepare Your GitHub Account
- Public and private repositories
- Issue tracking and pull requests
- GitHub Actions (2,000 minutes/month free)
- Basic collaboration features
- Perfect for individual projects
- Team collaboration features
- Advanced security settings
- Team permissions management
- Organization-wide settings
- Better for team projects
- Self-hosted or cloud
- Advanced compliance features
- SSO and SAML integration
- Priority support
- Custom policies
Create Personal Access Token
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token (classic)
- Give it a descriptive name (e.g., “NimbleBrain Studio”)
- Set expiration (recommended: 90 days for security)
- Select scopes based on what you need:
repo- Full repository access (read/write)read:org- Read organization dataworkflow- Update GitHub Actions workflowsgist- Create and manage gistsnotifications- Access notificationsproject- Access project boards
repo:status- Repository commit statusrepo_deployment- Deployment statuspublic_repo- Public repositories onlyread:user- Read user profile data
- Click Generate token
- Copy the token immediately - you won’t see it again!
Add to NimbleBrain Studio
- Navigate to MCP Servers in the sidebar
- Click Add Server
- Search for “GitHub” in the server registry
- Click Configure
- Enter your GitHub Personal Access Token
- (Optional) Configure toolsets - leave default for most users:
context- Current user and GitHub contextrepos- Repository operationsissues- Issue managementpull_requests- Pull request operationsusers- User information
- Click Save & Enable
Test the Connection
- “Show me open issues in [owner/repo]”
- “What pull requests need my review?”
- “Show my GitHub profile information”
Available Tools
The GitHub MCP Server provides 100+ tools organized into toolsets. Below are the most commonly used tools grouped by functionality.Repository Operations
Repository Operations
search_repositories
Search for repositories using GitHub’s powerful query syntax.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Repository search query (e.g., “machine learning stars:>1000 language:python”) |
| sort | string | No | Sort by stars, forks, updated, etc. |
| order | string | No | ”asc” or “desc” |
| page | number | No | Page number for pagination |
| perPage | number | No | Results per page (max 100) |
get_file_contents
Read files or directory contents from a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| path | string | No | Path to file/directory |
| ref | string | No | Git reference (branch, tag) |
create_or_update_file
Create a new file or update an existing one in a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| path | string | Yes | File path |
| content | string | Yes | File content |
| message | string | Yes | Commit message |
| branch | string | Yes | Branch to commit to |
| sha | string | No | Required for updates - file’s current SHA |
create_branch
Create a new branch from an existing branch.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| branch | string | Yes | New branch name |
| from_branch | string | No | Source branch (defaults to default branch) |
list_commits
List commits in a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| sha | string | No | Branch, tag, or commit SHA |
| author | string | No | Filter by author |
| page | number | No | Page number |
| perPage | number | No | Results per page |
search_code
Search code across repositories using GitHub’s code search.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Code search query |
| sort | string | No | Sort by indexed date |
| order | string | No | ”asc” or “desc” |
| page | number | No | Page number |
| perPage | number | No | Results per page |
create_repository
Create a new repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Repository name |
| description | string | No | Repository description |
| private | boolean | No | Private repository? |
| autoInit | boolean | No | Initialize with README |
| organization | string | No | Create in organization |
Issue Management
Issue Management
list_issues
List issues in a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| state | string | No | ”open”, “closed”, or “all” |
| labels | string[] | No | Filter by labels |
| orderBy | string | No | Order by field |
| direction | string | No | ”asc” or “desc” |
| perPage | number | No | Results per page |
issue_write
Create or update an issue.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| method | string | Yes | ”create” or “update” |
| title | string | No | Issue title (required for create) |
| body | string | No | Issue description |
| issue_number | number | No | Issue number (required for update) |
| labels | string[] | No | Labels to apply |
| assignees | string[] | No | Users to assign |
| state | string | No | ”open” or “closed” |
search_issues
Search issues and pull requests.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search query |
| owner | string | No | Limit to repository owner |
| repo | string | No | Limit to repository |
| sort | string | No | Sort field |
| order | string | No | ”asc” or “desc” |
| page | number | No | Page number |
add_issue_comment
Add a comment to an issue.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| issue_number | number | Yes | Issue number |
| body | string | Yes | Comment text |
Pull Request Operations
Pull Request Operations
list_pull_requests
List pull requests in a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| state | string | No | ”open”, “closed”, or “all” |
| head | string | No | Filter by head branch |
| base | string | No | Filter by base branch |
| sort | string | No | Sort by field |
| direction | string | No | ”asc” or “desc” |
| page | number | No | Page number |
create_pull_request
Create a new pull request.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| title | string | Yes | PR title |
| head | string | Yes | Branch with changes |
| base | string | Yes | Branch to merge into |
| body | string | No | PR description |
| draft | boolean | No | Create as draft? |
pull_request_read
Get detailed information about a pull request.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| pullNumber | number | Yes | PR number |
| method | string | Yes | ”get”, “get_diff”, “get_status”, “get_files”, “get_reviews”, “get_comments” |
| page | number | No | Page number |
| perPage | number | No | Results per page |
merge_pull_request
Merge a pull request.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| pullNumber | number | Yes | PR number |
| merge_method | string | No | ”merge”, “squash”, or “rebase” |
| commit_title | string | No | Merge commit title |
| commit_message | string | No | Merge commit message |
pull_request_review_write
Create or submit a pull request review.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| pullNumber | number | Yes | PR number |
| method | string | Yes | ”create”, “submit”, “delete” |
| body | string | No | Review comment |
| event | string | No | ”APPROVE”, “REQUEST_CHANGES”, “COMMENT” |
| commitID | string | No | Commit SHA to review |
GitHub Actions
GitHub Actions
list_workflows
List workflows in a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| page | number | No | Page number |
| perPage | number | No | Results per page |
list_workflow_runs
List workflow runs for a specific workflow.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| workflow_id | string | Yes | Workflow ID or filename |
| status | string | No | Filter by status |
| branch | string | No | Filter by branch |
| event | string | No | Filter by event type |
| page | number | No | Page number |
get_workflow_run
Get details of a specific workflow run.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| run_id | number | Yes | Workflow run ID |
get_job_logs
Get logs from workflow jobs.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| job_id | number | No | Job ID (for single job) |
| run_id | number | No | Run ID (when using failed_only) |
| failed_only | boolean | No | Get logs only for failed jobs |
| return_content | boolean | No | Return actual logs vs URLs |
| tail_lines | number | No | Number of lines from end |
run_workflow
Manually trigger a workflow run.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| workflow_id | string | Yes | Workflow ID or filename |
| ref | string | Yes | Git ref (branch or tag) |
| inputs | object | No | Workflow inputs |
rerun_workflow_run
Re-run a workflow run.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| run_id | number | Yes | Workflow run ID |
Security & Code Quality
Security & Code Quality
list_code_scanning_alerts
List code scanning alerts for a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| state | string | No | ”open”, “closed”, “dismissed” |
| severity | string | No | Filter by severity |
| tool_name | string | No | Filter by tool |
| ref | string | No | Filter by Git ref |
list_dependabot_alerts
List Dependabot alerts for dependencies.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| state | string | No | ”open”, “closed”, “dismissed” |
| severity | string | No | Filter by severity |
list_secret_scanning_alerts
List secret scanning alerts.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| state | string | No | ”open”, “closed”, “resolved” |
| secret_type | string | No | Filter by secret type |
| resolution | string | No | Filter by resolution |
list_global_security_advisories
Search global security advisories database.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| ghsaId | string | No | GitHub Security Advisory ID |
| cveId | string | No | CVE ID |
| ecosystem | string | No | Package ecosystem |
| severity | string | No | Advisory severity |
| cwes | string[] | No | CWE IDs |
| affects | string | No | Affected package |
Discussions
Discussions
list_discussions
List discussions in a repository or organization.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository/org owner |
| repo | string | No | Repository name |
| category | string | No | Filter by category ID |
| orderBy | string | No | Order by field |
| direction | string | No | ”asc” or “desc” |
| perPage | number | No | Results per page |
get_discussion
Get details of a specific discussion.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| discussionNumber | number | Yes | Discussion number |
get_discussion_comments
Get comments on a discussion.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| discussionNumber | number | Yes | Discussion number |
| perPage | number | No | Results per page |
| after | string | No | Cursor for pagination |
Projects
Projects
list_projects
List projects for a user or organization.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | User or org name |
| owner_type | string | Yes | ”user” or “org” |
| per_page | number | No | Results per page |
| query | string | No | Search query |
get_project
Get details of a specific project.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | User or org name |
| owner_type | string | Yes | ”user” or “org” |
| project_number | number | Yes | Project number |
list_project_items
List items in a project.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | User or org name |
| owner_type | string | Yes | ”user” or “org” |
| project_number | number | Yes | Project number |
| fields | string[] | No | Field IDs to include |
| query | string | No | Search query |
| per_page | number | No | Results per page |
add_project_item
Add an issue or PR to a project.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | User or org name |
| owner_type | string | Yes | ”user” or “org” |
| project_number | number | Yes | Project number |
| item_id | number | Yes | Issue or PR ID |
| item_type | string | Yes | ”issue” or “pull_request” |
Notifications
Notifications
list_notifications
List notifications for the authenticated user.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | No | Filter by repository owner |
| repo | string | No | Filter by repository |
| filter | string | No | ”all”, “participating”, “unread” |
| since | string | No | Filter by date (ISO 8601) |
| before | string | No | Filter by date (ISO 8601) |
| page | number | No | Page number |
mark_all_notifications_read
Mark all notifications as read.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | No | Limit to repository owner |
| repo | string | No | Limit to repository |
| lastReadAt | string | No | Timestamp (ISO 8601) |
dismiss_notification
Dismiss a specific notification.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| threadID | string | Yes | Notification thread ID |
| state | string | No | ”read” or “done” |
Gists
Gists
list_gists
List gists for a user.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | No | GitHub username (omit for authenticated user) |
| since | string | No | Filter by date (ISO 8601) |
| page | number | No | Page number |
| perPage | number | No | Results per page |
create_gist
Create a new gist.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| filename | string | Yes | Filename for the gist |
| content | string | Yes | File content |
| description | string | No | Gist description |
| public | boolean | No | Public or private |
update_gist
Update an existing gist.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| gist_id | string | Yes | Gist ID |
| filename | string | Yes | Filename to update |
| content | string | Yes | New content |
| description | string | No | Updated description |
Labels & Organization
Labels & Organization
list_label
List all labels in a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
label_write
Create, update, or delete a label.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| method | string | Yes | ”create”, “update”, or “delete” |
| name | string | Yes | Label name |
| color | string | No | Hex color (without #) |
| description | string | No | Label description |
| new_name | string | No | New name (for update) |
search_orgs
Search for organizations.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Organization search query |
| sort | string | No | Sort field |
| order | string | No | ”asc” or “desc” |
| page | number | No | Page number |
User & Team Operations
User & Team Operations
get_me
Get information about the authenticated user.Parameters: None requiredExample Usage:search_users
Search for GitHub users.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | User search query |
| sort | string | No | Sort by followers, repositories, joined |
| order | string | No | ”asc” or “desc” |
| page | number | No | Page number |
get_teams
Get teams for a user.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| user | string | No | Username (omit for authenticated user) |
get_team_members
Get members of a team.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| org | string | Yes | Organization name |
| team_slug | string | Yes | Team slug |
Releases & Tags
Releases & Tags
Stargazers
Stargazers
list_starred_repositories
List repositories starred by a user.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | No | GitHub username (omit for authenticated user) |
| sort | string | No | ”created” or “updated” |
| direction | string | No | ”asc” or “desc” |
| page | number | No | Page number |
star_repository
Star a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
unstar_repository
Remove a star from a repository.Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
Example Workflows
- Issue Management
- Pull Request Review
- Code Search & Analysis
- Release Management
- Repository Setup
- File Operations
- GitHub Actions Monitoring
- Security Monitoring
- Team Collaboration
- Project Management
- Creates new issue with clear title
- Sets bug and priority labels
- Assigns to team member
- Adds description with context
- Can link related issues
- “Show me all open high-priority bugs”
- “Add a comment with reproduction steps”
- “Update the issue to include error logs”
- “Close this issue as resolved”
Authentication
Creating Your GitHub PAT
GitHub authentication in Studio uses Personal Access Tokens, which means:- ✅ Fine-grained control over permissions
- ✅ Can be revoked anytime from GitHub settings
- ✅ Supports expiration dates for security
- ✅ No password exposure
- ✅ Works with 2FA enabled
- GitHub Settings → Developer settings → Personal access tokens
- Choose “Tokens (classic)” for broad compatibility
- Click “Generate new token (classic)”
- Name it clearly (e.g., “NimbleBrain Studio”)
- Set expiration (30-90 days recommended)
- Select required scopes
- Generate and copy immediately
Permission Scopes
GitHub has granular permissions. Choose based on your needs: Full Access (Recommended for Personal Use):repo- Full repository accessworkflow- Update GitHub Actionsadmin:org- Manage organizations (if needed)project- Manage projectsgist- Create and manage gistsnotifications- Access notifications
repo:status- Read commit statusrepo_deployment- Read deployment statuspublic_repo- Access public repositories onlyread:user- Read user profileread:org- Read organization dataread:project- Read project data
security_events- View security eventsread:packages- Read packagesread:gpg_key- Read GPG keys
Managing Your PAT
View and Revoke:- GitHub Settings → Developer settings → Personal access tokens
- See all active tokens with creation dates and scopes
- Click token name to view details or regenerate
- Click “Revoke” to immediately invalidate
- Settings → MCP Servers → GitHub
- Update token if regenerated
- Test connection after updating
Use Minimal Permissions
Use Minimal Permissions
- Start with read-only access
- Add write permissions as needed
- Avoid
adminscopes unless necessary - Use separate tokens for different purposes
Set Expiration Dates
Set Expiration Dates
- 30-90 days for active use
- 7 days for testing/development
- Shorter periods for higher security
- Set calendar reminders to regenerate
Never Commit Tokens
Never Commit Tokens
- Never commit .env files
- Use .gitignore properly
- Scan repositories for exposed tokens
- Use GitHub secret scanning
Enable Two-Factor Authentication
Enable Two-Factor Authentication
- Enable 2FA on your GitHub account
- Use authenticator app (not SMS)
- Save recovery codes securely
- Many organizations require 2FA
Monitor Token Usage
Monitor Token Usage
- Review GitHub audit logs
- Check for unexpected API calls
- Rotate tokens if suspicious
- Revoke unused tokens
Rate Limits
GitHub has rate limits to ensure API stability: Authenticated Requests (PAT):| Account Type | Rate Limit | Reset Period |
|---|---|---|
| Personal | 5,000 req/hour | 1 hour |
| Organization | 5,000 req/hour | 1 hour |
| GitHub Enterprise | Higher (custom) | 1 hour |
- Studio automatically tracks remaining quota
- Warns when approaching limits
- Pauses operations if limit exceeded
- Resumes automatically after reset
Fine-Grained PATs (Alternative)
GitHub offers fine-grained PATs with repository-specific access: Advantages:- Limit access to specific repositories
- More granular permissions
- Better audit trails
- Organization approval workflows
- Organization-managed access
- Production automation
- Limited repository access needed
- Enhanced security requirements
- GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Select specific repositories
- Choose granular permissions
- Set expiration and generate
Troubleshooting
Authentication Failed
Authentication Failed
- Verify token is copied correctly (no extra spaces)
- Check if token has expired in GitHub settings
- Confirm token hasn’t been revoked
- Ensure required scopes are granted
- Generate a new token if needed
- Update token in Studio: Settings → MCP Servers → GitHub
Rate Limit Exceeded
Rate Limit Exceeded
- Wait for rate limit reset (shown in error message)
- Check current quota: “Show my GitHub API rate limit”
- Reduce number of requests in workflows
- Use pagination instead of fetching all results
- Cache repository data locally
- Consider GitHub Enterprise for higher limits
- Use specific filters to reduce result sets
- Fetch only needed fields
- Combine related operations
Insufficient Permissions
Insufficient Permissions
- Identify required scope from error message
- Create new PAT with additional scopes
- Update token in Studio configuration
- For org repos, check organization permissions
- Verify you’re a collaborator on private repos
- Create issues:
repoorpublic_repo - Create PRs:
repo - Push code:
repo - Manage Actions:
workflow - Read security:
security_events - Manage projects:
project
Repository Not Found
Repository Not Found
- Verify repository name format: “owner/repo” (not just “repo”)
- Check repository spelling and capitalization
- Confirm repository exists and you have access
- For private repos, ensure PAT has repo scope
- Check if repository was renamed or deleted
- Verify organization name if applicable
Branch Protection Violations
Branch Protection Violations
- Create pull request instead of direct push
- Ensure all required status checks pass
- Get required approvals from reviewers
- Resolve merge conflicts
- Check branch protection rules: Settings → Branches
- Request admin override if urgent (not recommended)
- Minimum number of reviews (usually 1-2)
- All status checks passing
- No merge conflicts
- Linear history
- Signed commits
Merge Conflicts
Merge Conflicts
- View conflicting files: “Show merge conflicts for PR #123”
- Pull latest changes to your branch
- Resolve conflicts in your local editor or GitHub UI
- Push resolved changes
- Ask Studio to suggest conflict resolution strategy
- Keep feature branches up to date with main
- Merge main into feature branches regularly
- Communicate with team about overlapping work
- Use smaller, focused PRs
- Pull before pushing changes
File Too Large
File Too Large
- Use Git LFS for files >100MB
- Break large files into smaller chunks
- Use external storage (S3, Azure Blob) for binaries
- Check repository size limits
- Use GitHub Releases for distributing large files
- File size: 100MB (recommended max), 50MB (warning)
- Repository size: 1GB (recommended max), 5GB (soft limit)
- API response: 10MB max
- Release assets: 2GB max each
Workflow Trigger Failed
Workflow Trigger Failed
workflow_dispatch event configuredSolutions:- Check workflow file for
workflow_dispatchtrigger - Add
workflow_dispatchto workflow YAML - Commit updated workflow file
- Try triggering again after update
Secondary Rate Limit
Secondary Rate Limit
- Slow down request frequency
- Add delays between operations
- Batch operations where possible
- Avoid rapid polling (use webhooks instead)
- Wait for the specified retry-after period
- Max 100 concurrent requests
- Max 900 points/minute (varies by endpoint)
- Content creation limits (issues, PRs, comments)
- Use pagination efficiently
- Cache responses when appropriate
- Implement exponential backoff
- Use conditional requests (ETags)
Push Rejected
Push Rejected
- Create new commits instead of rewriting history
- Use pull requests for changes
- Contact repository admin if force push truly needed
- Create new branch if history is broken
- Use revert commits instead of amending
- Create fix commits on top of problematic commits
- Use
git mergeinstead ofgit rebasefor shared branches
Links & Resources
NimbleBrain Wrapper
GitHub MCP Server
GitHub API Documentation
GitHub Status
Learning Resources
GitHub Basics
GitHub Basics
- Version Control: Track every change to your code
- Collaboration: Work with teams around the world
- Code Review: Review and discuss code before merging
- Project Management: Issues, projects, milestones
- CI/CD: Automate testing and deployment with GitHub Actions
- Open Source: Host and contribute to open source projects
- Repository (Repo): Project container with code and history
- Commit: Snapshot of changes at a point in time
- Branch: Parallel version of your code
- Pull Request (PR): Proposed changes for review
- Issue: Bug reports and feature requests
- Fork: Personal copy of someone else’s repository
- Star: Bookmark repositories you like
- Create repository or fork existing
- Clone to local machine
- Create branch for feature
- Make changes and commit
- Push branch to GitHub
- Open pull request
- Review and discuss changes
- Merge when approved
Git vs GitHub
Git vs GitHub
- Command-line tool (git)
- Tracks changes in code
- Works locally on your computer
- Creates commit history
- Manages branches
- Created by Linus Torvalds in 2005
- Web-based Git repository hosting
- Collaboration features (PRs, reviews)
- Issue tracking and project management
- CI/CD with GitHub Actions
- Security features (Dependabot, code scanning)
- Social features (stars, follows, profiles)
- Owned by Microsoft
- Git = Your local word processor
- GitHub = Google Docs (cloud-based, collaborative)
- Git provides version control locally
- GitHub provides collaboration remotely
- Together they enable modern software development
Personal Access Tokens vs OAuth
Personal Access Tokens vs OAuth
- Direct API authentication
- Fine-grained scope control
- Supports all GitHub features
- Works with any client
- No redirect flows needed
- Can set expiration dates
- Must be stored securely
- Manual creation and management
- No automatic refresh
- User needs GitHub account access
- No password exposure
- Automatic token management
- Easy revocation
- Built-in consent screens
- Requires OAuth app setup
- More complex flow
- May need redirect URLs
- Less control over scopes
- PATs are recommended for simplicity
- Full API feature support
- Better control over permissions
- Easier configuration
Repository Visibility
Repository Visibility
- ✅ Visible to everyone on the internet
- ✅ Anyone can clone and fork
- ✅ Great for open source projects
- ✅ Unlimited free public repos
- ✅ Builds your profile and portfolio
- ⚠️ All code and history is public
- ✅ Only you and collaborators can access
- ✅ Better for proprietary code
- ✅ Unlimited free private repos (all plans)
- ✅ Unlimited collaborators (all plans)
- ⚠️ Doesn’t contribute to public profile
- ✅ Visible to all organization members
- ✅ Not visible to outside world
- ✅ Good for company-wide tools
- ⚠️ Requires GitHub Enterprise
- Public: Open source, learning projects, portfolios
- Private: Client work, proprietary code, experiments
- Internal: Company libraries, internal tools
- Settings → Danger Zone → Change visibility
- Public → Private: Anytime, free
- Private → Public: Consider implications first
Branch Protection Best Practices
Branch Protection Best Practices
- Prevents accidental changes to important branches
- Ensures code quality through reviews
- Maintains clean commit history
- Enforces CI/CD checks
- Reduces production incidents
- Require Pull Requests: No direct pushes
- Require Reviews: At least 1-2 approvals
- Require Status Checks: All CI tests must pass
- Require Up-to-Date Branches: Must be current with base
- Restrict Force Pushes: Prevent history rewriting
- Restrict Deletions: Prevent accidental deletion
- Require Signed Commits: Verify author identity (optional)
- Require linear history (no merge commits)
- Dismiss stale reviews on new commits
- Require review from code owners
- Restrict who can push (admins only)
- Include administrators in rules
- Always: main, master, production, release branches
- Usually: development, staging branches
- Rarely: feature, personal branches
- Never: experimental, temporary branches
- Repository Settings → Branches
- Click “Add branch protection rule”
- Enter branch name pattern (e.g.,
main) - Select protection options
- Save changes
GitHub Actions Basics
GitHub Actions Basics
- Run tests on pull requests
- Deploy on merge to main
- Publish releases
- Scheduled jobs (nightly builds, cleanup)
- Custom automation (notifications, labeling)
- Workflow: Automated process (defined in YAML)
- Job: Set of steps that run on same runner
- Step: Individual task (run command, use action)
- Runner: Server that runs workflows (GitHub-hosted or self-hosted)
- Action: Reusable unit of code
- CI (Continuous Integration): Test every commit
- CD (Continuous Deployment): Deploy to production
- Code Quality: Linting, formatting, security scans
- Automated Testing: Unit, integration, e2e tests
- Release Management: Build, tag, publish releases
- Notifications: Slack messages, emails
- Unlimited minutes
- Linux, Windows, macOS runners
- Matrix builds
- Concurrent workflows
- 2,000 minutes/month
- Resets monthly
- Additional minutes can be purchased
Code Review Best Practices
Code Review Best Practices
- Catch bugs before production
- Share knowledge across team
- Maintain code quality standards
- Mentor junior developers
- Enforce best practices
- Small & Focused: One feature or fix per PR
- Clear Title: Describe what changes
- Good Description: Explain why changes made
- Add Tests: Prove changes work
- Update Docs: Keep documentation current
- Link Issues: Reference related issues
- Add Screenshots: For UI changes
- Read Description: Understand the goal
- Check Tests: Ensure proper coverage
- Look for Bugs: Edge cases, error handling
- Check Style: Follows team conventions
- Consider Design: Is it the right approach?
- Be Constructive: Suggest improvements nicely
- Approve Fast: Don’t block unnecessarily
- Approve: Changes look good, ready to merge
- Request Changes: Issues that must be fixed
- Comment: Suggestions, questions, discussion
Issue Labels & Organization
Issue Labels & Organization
- Categorize issues and PRs
- Track priority and status
- Filter and search effectively
- Automate workflows
- Generate metrics and reports
bug- Something isn’t workingfeature- New functionality requestenhancement- Improvement to existing featuredocumentation- Documentation updatesquestion- Need clarification
priority:critical- Needs immediate attentionpriority:high- Important, address soonpriority:medium- Normal prioritypriority:low- Nice to have
in-progress- Currently being worked onblocked- Waiting on somethingneeds-review- Ready for reviewneeds-triage- Needs initial review
effort:small- <1 dayeffort:medium- 1-3 dayseffort:large- >3 days
frontend- UI/UX changesbackend- Server-side changesdevops- Infrastructuresecurity- Security-related
- Use consistent naming (lowercase, hyphens)
- Use colors meaningfully (red=critical, green=feature)
- Don’t create too many (20-30 is plenty)
- Document label meanings
- Use emoji for visual distinction
Need help? Join the NimbleBrain Discord or email [email protected]