claude-autopm 1.15.3 → 1.15.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -194,11 +194,11 @@ autopm mcp enable playwright-mcp
194
194
  # Set up visual testing baselines
195
195
  ```
196
196
 
197
- ### GitHub Integration
197
+ ### Playwright Testing
198
198
  ```bash
199
- autopm mcp enable github-mcp
200
- # Configure PAT token
201
- # Set default repository
199
+ autopm mcp enable playwright-mcp
200
+ # Configure browser automation
201
+ # Set test defaults
202
202
  ```
203
203
 
204
204
  ## Metrics and Monitoring
@@ -25,7 +25,7 @@ autopm mcp sync
25
25
 
26
26
  ```bash
27
27
  # Copy and modify
28
- cp .claude/examples/mcp/github-mcp.md .claude/mcp/my-custom-server.md
28
+ cp .claude/examples/mcp/playwright-mcp.md .claude/mcp/my-custom-server.md
29
29
  nano .claude/mcp/my-custom-server.md
30
30
 
31
31
  # Enable and sync
@@ -46,7 +46,6 @@ autopm mcp add
46
46
  - **context7.md** - Context7 up-to-date documentation database
47
47
 
48
48
  ### Integration Servers
49
- - **github-mcp.md** - GitHub repository management
50
49
  - **filesystem-mcp.md** - Local filesystem operations
51
50
 
52
51
  ### Testing Servers
@@ -20,11 +20,6 @@ Example MCP server configurations are available in `.claude/examples/mcp/`:
20
20
  **Use Cases**: E2E testing, visual testing, browser automation
21
21
  **Example**: `.claude/examples/mcp/playwright-mcp.md`
22
22
 
23
- ### github-mcp
24
- **Description**: GitHub MCP server for repository management
25
- **Use Cases**: Issue tracking, PR management, repository analysis
26
- **Example**: `.claude/examples/mcp/github-mcp.md`
27
-
28
23
  ### filesystem-mcp
29
24
  **Description**: Local filesystem access server
30
25
  **Use Cases**: File operations, directory navigation, content management
@@ -101,7 +96,7 @@ autopm mcp add
101
96
  cp .claude/examples/mcp/context7.md .claude/mcp/
102
97
 
103
98
  # Or from installed framework
104
- cp /path/to/framework/autopm/.claude/examples/mcp/github-mcp.md .claude/mcp/
99
+ cp /path/to/framework/autopm/.claude/examples/mcp/playwright-mcp.md .claude/mcp/
105
100
  ```
106
101
 
107
102
  ### ✅ Enabling/Disabling Servers
@@ -1,30 +1,33 @@
1
1
  {
2
+ "dependencies": {
3
+ "js-yaml": "^4.1.0"
4
+ },
2
5
  "scripts": {
3
6
  "// Safety Scripts": "Safeguards against bad commits",
4
7
  "precommit": "npm test && npm run build && npm run lint",
5
8
  "verify": "npm test && npm run build && npm run lint && npm run typecheck",
6
9
  "safe-commit": "./scripts/safe-commit.sh",
7
10
  "prepush": "npm run verify && npm run test:e2e",
8
-
11
+
9
12
  "// Quick Checks": "Quick checks",
10
13
  "check": "npm run lint && npm run typecheck",
11
14
  "check:all": "npm run verify",
12
-
15
+
13
16
  "// Git Helpers": "Git helper commands",
14
17
  "commit": "npm run precommit && git add -A && git commit",
15
18
  "push:safe": "npm run prepush && git push",
16
-
19
+
17
20
  "// CI/CD Simulation": "Local CI/CD simulation",
18
21
  "ci:local": "npm ci && npm run verify && npm run test:e2e",
19
22
  "ci:validate": "npm run ci:local",
20
-
23
+
21
24
  "// Emergency": "Emergency",
22
25
  "fix": "npm run lint -- --fix && npm run format",
23
26
  "format": "prettier --write .",
24
27
  "clean:hooks": "rm -f .git/hooks/pre-* && npm run setup:hooks",
25
28
  "setup:hooks": "husky install || cp scripts/hooks/* .git/hooks/"
26
29
  },
27
-
30
+
28
31
  "husky": {
29
32
  "hooks": {
30
33
  "pre-commit": "npm run precommit",
@@ -32,7 +35,7 @@
32
35
  "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
33
36
  }
34
37
  },
35
-
38
+
36
39
  "// Usage examples": [
37
40
  "npm run safe-commit 'feat: add new feature'",
38
41
  "npm run verify",
@@ -339,6 +339,63 @@ ${this.colors.BOLD}Examples:${this.colors.NC}
339
339
  this.printSuccess(`Installed ${script}`);
340
340
  }
341
341
  }
342
+
343
+ // Install package.json if it doesn't exist
344
+ const packageJsonPath = path.join(this.targetDir, 'package.json');
345
+ const packageJsonTemplatePath = path.join(this.autopmDir, 'scripts', 'package.json.template');
346
+
347
+ if (!fs.existsSync(packageJsonPath) && fs.existsSync(packageJsonTemplatePath)) {
348
+ this.printStep('Creating package.json from template...');
349
+ const templateContent = fs.readFileSync(packageJsonTemplatePath, 'utf-8');
350
+
351
+ // Try to get project name from directory
352
+ const projectName = path.basename(this.targetDir);
353
+
354
+ // Parse template and add name field
355
+ const packageJson = JSON.parse(templateContent);
356
+ packageJson.name = projectName;
357
+ packageJson.version = packageJson.version || '1.0.0';
358
+ packageJson.description = packageJson.description || '';
359
+ packageJson.main = packageJson.main || 'index.js';
360
+ packageJson.license = packageJson.license || 'ISC';
361
+
362
+ fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8');
363
+ this.printSuccess('Created package.json');
364
+ } else if (fs.existsSync(packageJsonPath)) {
365
+ this.printInfo('package.json already exists, skipping');
366
+ }
367
+ }
368
+
369
+ installDependencies() {
370
+ const packageJsonPath = path.join(this.targetDir, 'package.json');
371
+
372
+ if (!fs.existsSync(packageJsonPath)) {
373
+ this.printInfo('No package.json found, skipping dependency installation');
374
+ return;
375
+ }
376
+
377
+ this.printStep('Installing npm dependencies...');
378
+
379
+ try {
380
+ // Check if package.json has dependencies
381
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
382
+ if (!packageJson.dependencies || Object.keys(packageJson.dependencies).length === 0) {
383
+ this.printInfo('No dependencies to install');
384
+ return;
385
+ }
386
+
387
+ // Run npm install
388
+ execSync('npm install', {
389
+ cwd: this.targetDir,
390
+ encoding: 'utf-8',
391
+ stdio: 'inherit'
392
+ });
393
+
394
+ this.printSuccess('Dependencies installed successfully');
395
+ } catch (error) {
396
+ this.printWarning(`Failed to install dependencies: ${error.message}`);
397
+ this.printInfo('You can manually run: npm install');
398
+ }
342
399
  }
343
400
 
344
401
  checkToolAvailability() {
@@ -903,6 +960,9 @@ See: https://github.com/rafeekpro/ClaudeAutoPM
903
960
  await this.setupGitHooks();
904
961
  }
905
962
 
963
+ // Install npm dependencies
964
+ this.installDependencies();
965
+
906
966
  // Final success message
907
967
  console.log('');
908
968
  this.printMsg('GREEN', '╔══════════════════════════════════════════╗');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-autopm",
3
- "version": "1.15.3",
3
+ "version": "1.15.5",
4
4
  "description": "Autonomous Project Management Framework for Claude Code - Advanced AI-powered development automation",
5
5
  "main": "bin/autopm.js",
6
6
  "bin": {
@@ -1,350 +0,0 @@
1
- ---
2
- name: github-mcp
3
- command: npx
4
- args: ["@modelcontextprotocol/server-github"]
5
- env:
6
- GITHUB_PERSONAL_ACCESS_TOKEN: "${GITHUB_TOKEN:-}"
7
- GITHUB_API_URL: "${GITHUB_API_URL:-https://api.github.com}"
8
- envFile: .claude/.env
9
- description: GitHub MCP server for repository management and collaboration
10
- category: integration
11
- status: active
12
- version: ">=1.0.0"
13
- ---
14
-
15
- # GitHub MCP Server
16
-
17
- ## Description
18
-
19
- The GitHub MCP Server provides comprehensive GitHub integration through the Model Context Protocol, enabling repository management, issue tracking, pull request workflows, and collaborative development features.
20
-
21
- ## Features
22
-
23
- - **Repository Management**: Create, clone, configure repositories
24
- - **Issue Tracking**: Create, update, search issues
25
- - **Pull Requests**: Create, review, merge PRs
26
- - **Actions/Workflows**: Manage GitHub Actions
27
- - **Code Search**: Search across repositories
28
- - **Release Management**: Create and manage releases
29
- - **Team Collaboration**: Manage teams and permissions
30
-
31
- ## Configuration
32
-
33
- ### Required Environment Variables
34
-
35
- - `GITHUB_PERSONAL_ACCESS_TOKEN`: Your GitHub PAT (required)
36
-
37
- ### Optional Environment Variables
38
-
39
- - `GITHUB_API_URL`: GitHub API endpoint (for GitHub Enterprise)
40
- - `GITHUB_DEFAULT_OWNER`: Default repository owner
41
- - `GITHUB_DEFAULT_REPO`: Default repository name
42
-
43
- ### Token Permissions
44
-
45
- Required scopes for full functionality:
46
- ```
47
- repo - Full repository access
48
- workflow - GitHub Actions workflows
49
- write:packages - Package registry
50
- admin:org - Organization management (optional)
51
- gist - Gist creation (optional)
52
- ```
53
-
54
- ## Usage Examples
55
-
56
- ### Basic Setup
57
-
58
- ```bash
59
- # Enable the server
60
- autopm mcp enable github-mcp
61
-
62
- # Configure authentication
63
- echo "GITHUB_TOKEN=ghp_your_token_here" >> .claude/.env
64
-
65
- # For a specific repository
66
- echo "GITHUB_DEFAULT_OWNER=your-username" >> .claude/.env
67
- echo "GITHUB_DEFAULT_REPO=your-repo" >> .claude/.env
68
-
69
- # Sync configuration
70
- autopm mcp sync
71
- ```
72
-
73
- ### Integration with Agents
74
-
75
- Commonly used with:
76
- - `github-operations-specialist` - For DevOps workflows
77
- - `code-analyzer` - For PR reviews
78
- - `test-runner` - For CI/CD integration
79
-
80
- ## MCP Commands
81
-
82
- ### Repository Operations
83
-
84
- ```javascript
85
- // Get repository info
86
- github.getRepository({ owner, repo })
87
-
88
- // Create repository
89
- github.createRepository({
90
- name: "new-repo",
91
- description: "Repository description",
92
- private: false,
93
- auto_init: true
94
- })
95
-
96
- // List repositories
97
- github.listRepositories({ type: "owner" })
98
- ```
99
-
100
- ### Issue Management
101
-
102
- ```javascript
103
- // Create issue
104
- github.createIssue({
105
- title: "Bug: Application crashes",
106
- body: "Detailed description...",
107
- labels: ["bug", "high-priority"],
108
- assignees: ["username"]
109
- })
110
-
111
- // Update issue
112
- github.updateIssue({
113
- issue_number: 123,
114
- state: "closed",
115
- labels: ["resolved"]
116
- })
117
-
118
- // Search issues
119
- github.searchIssues({
120
- query: "is:open label:bug"
121
- })
122
- ```
123
-
124
- ### Pull Request Workflows
125
-
126
- ```javascript
127
- // Create PR
128
- github.createPullRequest({
129
- title: "Feature: Add new functionality",
130
- head: "feature-branch",
131
- base: "main",
132
- body: "PR description..."
133
- })
134
-
135
- // Review PR
136
- github.createReview({
137
- pull_number: 456,
138
- event: "APPROVE",
139
- body: "LGTM!"
140
- })
141
-
142
- // Merge PR
143
- github.mergePullRequest({
144
- pull_number: 456,
145
- merge_method: "squash"
146
- })
147
- ```
148
-
149
- ### GitHub Actions
150
-
151
- ```javascript
152
- // Trigger workflow
153
- github.triggerWorkflow({
154
- workflow_id: "ci.yml",
155
- ref: "main",
156
- inputs: { environment: "production" }
157
- })
158
-
159
- // Get workflow runs
160
- github.listWorkflowRuns({
161
- workflow_id: "ci.yml",
162
- status: "completed"
163
- })
164
- ```
165
-
166
- ## Advanced Features
167
-
168
- ### Code Search
169
-
170
- ```javascript
171
- // Search code
172
- github.searchCode({
173
- query: "function TODO in:file language:js repo:owner/repo"
174
- })
175
-
176
- // Search commits
177
- github.searchCommits({
178
- query: "fix bug author:username"
179
- })
180
- ```
181
-
182
- ### Release Management
183
-
184
- ```javascript
185
- // Create release
186
- github.createRelease({
187
- tag_name: "v1.0.0",
188
- name: "Version 1.0.0",
189
- body: "Release notes...",
190
- draft: false,
191
- prerelease: false
192
- })
193
-
194
- // Upload release asset
195
- github.uploadReleaseAsset({
196
- release_id: 789,
197
- name: "app.zip",
198
- data: fileBuffer
199
- })
200
- ```
201
-
202
- ### Webhooks
203
-
204
- ```javascript
205
- // Create webhook
206
- github.createWebhook({
207
- config: {
208
- url: "https://example.com/webhook",
209
- content_type: "json"
210
- },
211
- events: ["push", "pull_request"]
212
- })
213
- ```
214
-
215
- ## Workflow Integration
216
-
217
- ### Automated PR Workflow
218
-
219
- ```yaml
220
- workflow:
221
- - create_branch: feature/new-feature
222
- - commit_changes:
223
- message: "Add new feature"
224
- - create_pr:
225
- title: "Feature: New functionality"
226
- reviewers: ["reviewer1", "reviewer2"]
227
- - wait_for_checks: true
228
- - auto_merge:
229
- method: squash
230
- delete_branch: true
231
- ```
232
-
233
- ### Issue Triage
234
-
235
- ```yaml
236
- triage:
237
- rules:
238
- - if: "title contains 'bug'"
239
- then:
240
- - add_label: bug
241
- - assign_to: bug-team
242
- - if: "title contains 'feature'"
243
- then:
244
- - add_label: enhancement
245
- - add_to_project: feature-requests
246
- ```
247
-
248
- ## Best Practices
249
-
250
- 1. **Authentication**
251
- - Use fine-grained PATs
252
- - Rotate tokens regularly
253
- - Store securely in .env
254
-
255
- 2. **Rate Limiting**
256
- - Monitor API usage
257
- - Implement caching
258
- - Use conditional requests
259
-
260
- 3. **Branch Protection**
261
- - Require PR reviews
262
- - Enable status checks
263
- - Protect main branch
264
-
265
- 4. **Automation**
266
- - Use GitHub Actions for CI/CD
267
- - Automate repetitive tasks
268
- - Implement proper error handling
269
-
270
- ## Troubleshooting
271
-
272
- ### Common Issues
273
-
274
- 1. **Authentication Failed**
275
- - Verify token is valid
276
- - Check token permissions
277
- - Ensure token hasn't expired
278
-
279
- 2. **Rate Limit Exceeded**
280
- - Check rate limit status
281
- - Implement exponential backoff
282
- - Use authenticated requests
283
-
284
- 3. **Permission Denied**
285
- - Verify repository access
286
- - Check organization permissions
287
- - Ensure proper token scopes
288
-
289
- ### Debug Mode
290
-
291
- ```bash
292
- # Enable debug logging
293
- export GITHUB_DEBUG=true
294
- export NODE_DEBUG=github
295
- ```
296
-
297
- ## Security Considerations
298
-
299
- 1. **Token Security**
300
- - Never commit tokens
301
- - Use environment variables
302
- - Implement token rotation
303
-
304
- 2. **Repository Access**
305
- - Use least privilege principle
306
- - Review collaborator permissions
307
- - Enable 2FA
308
-
309
- 3. **Webhook Security**
310
- - Validate webhook signatures
311
- - Use HTTPS endpoints
312
- - Implement IP allowlisting
313
-
314
- ## GitHub Enterprise
315
-
316
- For GitHub Enterprise Server:
317
-
318
- ```bash
319
- # Configure enterprise URL
320
- export GITHUB_API_URL=https://github.enterprise.com/api/v3
321
- export GITHUB_GRAPHQL_URL=https://github.enterprise.com/api/graphql
322
- ```
323
-
324
- ## Rate Limits
325
-
326
- ### API Limits
327
- - Authenticated: 5,000 requests/hour
328
- - Search: 30 requests/minute
329
- - GraphQL: 5,000 points/hour
330
-
331
- ### Checking Rate Limit
332
-
333
- ```javascript
334
- github.getRateLimit()
335
- // Returns: { limit, remaining, reset }
336
- ```
337
-
338
- ## Version History
339
-
340
- - **1.0.0**: Initial MCP integration
341
- - **1.1.0**: Added Actions support
342
- - **1.2.0**: GraphQL API integration
343
- - **1.3.0**: Enterprise support
344
- - **1.4.0**: Advanced search capabilities
345
-
346
- ## Related Resources
347
-
348
- - [GitHub API Documentation](https://docs.github.com/en/rest)
349
- - [GitHub Actions](https://docs.github.com/en/actions)
350
- - [GitHub Operations Specialist](../agents/devops/github-operations-specialist.md)
@@ -1,350 +0,0 @@
1
- ---
2
- name: github-mcp
3
- command: npx
4
- args: ["@modelcontextprotocol/server-github"]
5
- env:
6
- GITHUB_PERSONAL_ACCESS_TOKEN: "${GITHUB_TOKEN:-}"
7
- GITHUB_API_URL: "${GITHUB_API_URL:-https://api.github.com}"
8
- envFile: .claude/.env
9
- description: GitHub MCP server for repository management and collaboration
10
- category: integration
11
- status: active
12
- version: ">=1.0.0"
13
- ---
14
-
15
- # GitHub MCP Server
16
-
17
- ## Description
18
-
19
- The GitHub MCP Server provides comprehensive GitHub integration through the Model Context Protocol, enabling repository management, issue tracking, pull request workflows, and collaborative development features.
20
-
21
- ## Features
22
-
23
- - **Repository Management**: Create, clone, configure repositories
24
- - **Issue Tracking**: Create, update, search issues
25
- - **Pull Requests**: Create, review, merge PRs
26
- - **Actions/Workflows**: Manage GitHub Actions
27
- - **Code Search**: Search across repositories
28
- - **Release Management**: Create and manage releases
29
- - **Team Collaboration**: Manage teams and permissions
30
-
31
- ## Configuration
32
-
33
- ### Required Environment Variables
34
-
35
- - `GITHUB_PERSONAL_ACCESS_TOKEN`: Your GitHub PAT (required)
36
-
37
- ### Optional Environment Variables
38
-
39
- - `GITHUB_API_URL`: GitHub API endpoint (for GitHub Enterprise)
40
- - `GITHUB_DEFAULT_OWNER`: Default repository owner
41
- - `GITHUB_DEFAULT_REPO`: Default repository name
42
-
43
- ### Token Permissions
44
-
45
- Required scopes for full functionality:
46
- ```
47
- repo - Full repository access
48
- workflow - GitHub Actions workflows
49
- write:packages - Package registry
50
- admin:org - Organization management (optional)
51
- gist - Gist creation (optional)
52
- ```
53
-
54
- ## Usage Examples
55
-
56
- ### Basic Setup
57
-
58
- ```bash
59
- # Enable the server
60
- autopm mcp enable github-mcp
61
-
62
- # Configure authentication
63
- echo "GITHUB_TOKEN=ghp_your_token_here" >> .claude/.env
64
-
65
- # For a specific repository
66
- echo "GITHUB_DEFAULT_OWNER=your-username" >> .claude/.env
67
- echo "GITHUB_DEFAULT_REPO=your-repo" >> .claude/.env
68
-
69
- # Sync configuration
70
- autopm mcp sync
71
- ```
72
-
73
- ### Integration with Agents
74
-
75
- Commonly used with:
76
- - `github-operations-specialist` - For DevOps workflows
77
- - `code-analyzer` - For PR reviews
78
- - `test-runner` - For CI/CD integration
79
-
80
- ## MCP Commands
81
-
82
- ### Repository Operations
83
-
84
- ```javascript
85
- // Get repository info
86
- github.getRepository({ owner, repo })
87
-
88
- // Create repository
89
- github.createRepository({
90
- name: "new-repo",
91
- description: "Repository description",
92
- private: false,
93
- auto_init: true
94
- })
95
-
96
- // List repositories
97
- github.listRepositories({ type: "owner" })
98
- ```
99
-
100
- ### Issue Management
101
-
102
- ```javascript
103
- // Create issue
104
- github.createIssue({
105
- title: "Bug: Application crashes",
106
- body: "Detailed description...",
107
- labels: ["bug", "high-priority"],
108
- assignees: ["username"]
109
- })
110
-
111
- // Update issue
112
- github.updateIssue({
113
- issue_number: 123,
114
- state: "closed",
115
- labels: ["resolved"]
116
- })
117
-
118
- // Search issues
119
- github.searchIssues({
120
- query: "is:open label:bug"
121
- })
122
- ```
123
-
124
- ### Pull Request Workflows
125
-
126
- ```javascript
127
- // Create PR
128
- github.createPullRequest({
129
- title: "Feature: Add new functionality",
130
- head: "feature-branch",
131
- base: "main",
132
- body: "PR description..."
133
- })
134
-
135
- // Review PR
136
- github.createReview({
137
- pull_number: 456,
138
- event: "APPROVE",
139
- body: "LGTM!"
140
- })
141
-
142
- // Merge PR
143
- github.mergePullRequest({
144
- pull_number: 456,
145
- merge_method: "squash"
146
- })
147
- ```
148
-
149
- ### GitHub Actions
150
-
151
- ```javascript
152
- // Trigger workflow
153
- github.triggerWorkflow({
154
- workflow_id: "ci.yml",
155
- ref: "main",
156
- inputs: { environment: "production" }
157
- })
158
-
159
- // Get workflow runs
160
- github.listWorkflowRuns({
161
- workflow_id: "ci.yml",
162
- status: "completed"
163
- })
164
- ```
165
-
166
- ## Advanced Features
167
-
168
- ### Code Search
169
-
170
- ```javascript
171
- // Search code
172
- github.searchCode({
173
- query: "function TODO in:file language:js repo:owner/repo"
174
- })
175
-
176
- // Search commits
177
- github.searchCommits({
178
- query: "fix bug author:username"
179
- })
180
- ```
181
-
182
- ### Release Management
183
-
184
- ```javascript
185
- // Create release
186
- github.createRelease({
187
- tag_name: "v1.0.0",
188
- name: "Version 1.0.0",
189
- body: "Release notes...",
190
- draft: false,
191
- prerelease: false
192
- })
193
-
194
- // Upload release asset
195
- github.uploadReleaseAsset({
196
- release_id: 789,
197
- name: "app.zip",
198
- data: fileBuffer
199
- })
200
- ```
201
-
202
- ### Webhooks
203
-
204
- ```javascript
205
- // Create webhook
206
- github.createWebhook({
207
- config: {
208
- url: "https://example.com/webhook",
209
- content_type: "json"
210
- },
211
- events: ["push", "pull_request"]
212
- })
213
- ```
214
-
215
- ## Workflow Integration
216
-
217
- ### Automated PR Workflow
218
-
219
- ```yaml
220
- workflow:
221
- - create_branch: feature/new-feature
222
- - commit_changes:
223
- message: "Add new feature"
224
- - create_pr:
225
- title: "Feature: New functionality"
226
- reviewers: ["reviewer1", "reviewer2"]
227
- - wait_for_checks: true
228
- - auto_merge:
229
- method: squash
230
- delete_branch: true
231
- ```
232
-
233
- ### Issue Triage
234
-
235
- ```yaml
236
- triage:
237
- rules:
238
- - if: "title contains 'bug'"
239
- then:
240
- - add_label: bug
241
- - assign_to: bug-team
242
- - if: "title contains 'feature'"
243
- then:
244
- - add_label: enhancement
245
- - add_to_project: feature-requests
246
- ```
247
-
248
- ## Best Practices
249
-
250
- 1. **Authentication**
251
- - Use fine-grained PATs
252
- - Rotate tokens regularly
253
- - Store securely in .env
254
-
255
- 2. **Rate Limiting**
256
- - Monitor API usage
257
- - Implement caching
258
- - Use conditional requests
259
-
260
- 3. **Branch Protection**
261
- - Require PR reviews
262
- - Enable status checks
263
- - Protect main branch
264
-
265
- 4. **Automation**
266
- - Use GitHub Actions for CI/CD
267
- - Automate repetitive tasks
268
- - Implement proper error handling
269
-
270
- ## Troubleshooting
271
-
272
- ### Common Issues
273
-
274
- 1. **Authentication Failed**
275
- - Verify token is valid
276
- - Check token permissions
277
- - Ensure token hasn't expired
278
-
279
- 2. **Rate Limit Exceeded**
280
- - Check rate limit status
281
- - Implement exponential backoff
282
- - Use authenticated requests
283
-
284
- 3. **Permission Denied**
285
- - Verify repository access
286
- - Check organization permissions
287
- - Ensure proper token scopes
288
-
289
- ### Debug Mode
290
-
291
- ```bash
292
- # Enable debug logging
293
- export GITHUB_DEBUG=true
294
- export NODE_DEBUG=github
295
- ```
296
-
297
- ## Security Considerations
298
-
299
- 1. **Token Security**
300
- - Never commit tokens
301
- - Use environment variables
302
- - Implement token rotation
303
-
304
- 2. **Repository Access**
305
- - Use least privilege principle
306
- - Review collaborator permissions
307
- - Enable 2FA
308
-
309
- 3. **Webhook Security**
310
- - Validate webhook signatures
311
- - Use HTTPS endpoints
312
- - Implement IP allowlisting
313
-
314
- ## GitHub Enterprise
315
-
316
- For GitHub Enterprise Server:
317
-
318
- ```bash
319
- # Configure enterprise URL
320
- export GITHUB_API_URL=https://github.enterprise.com/api/v3
321
- export GITHUB_GRAPHQL_URL=https://github.enterprise.com/api/graphql
322
- ```
323
-
324
- ## Rate Limits
325
-
326
- ### API Limits
327
- - Authenticated: 5,000 requests/hour
328
- - Search: 30 requests/minute
329
- - GraphQL: 5,000 points/hour
330
-
331
- ### Checking Rate Limit
332
-
333
- ```javascript
334
- github.getRateLimit()
335
- // Returns: { limit, remaining, reset }
336
- ```
337
-
338
- ## Version History
339
-
340
- - **1.0.0**: Initial MCP integration
341
- - **1.1.0**: Added Actions support
342
- - **1.2.0**: GraphQL API integration
343
- - **1.3.0**: Enterprise support
344
- - **1.4.0**: Advanced search capabilities
345
-
346
- ## Related Resources
347
-
348
- - [GitHub API Documentation](https://docs.github.com/en/rest)
349
- - [GitHub Actions](https://docs.github.com/en/actions)
350
- - [GitHub Operations Specialist](../agents/devops/github-operations-specialist.md)