angelxmoreno / angelxmoreno/mcp-github-code-review
Enhancement: Support GitHub Enterprise by using URL API for PR parsing
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Currently, the GitHubService uses a hardcoded regex pattern that only supports github.com URLs:
```typescript
const match = pr.url.match(/github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/);
```
## Proposed Enhancement
Replace the regex with the URL API to support any host, including GitHub Enterprise:
```typescript
const u = new URL(pr.url);
const parts = u.pathname.split('/').filter(Boolean);
const [owner, repo, , prNumberStr] = parts;
```
## Context
This enhancement was suggested in PR #2 but deferred for future consideration as GitHub Enterprise support is not currently required for the project.
## References
- Original PR: https://github.com/angelxmoreno/mcp-github-code-review/pull/2
- Discussion: https://github.com/angelxmoreno/mcp-github-code-review/pull/2#discussion_r2308170739
## Priority
Low - only needed if GitHub Enterprise support becomes a requirement.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.