Commit Graph

596 Commits

Author SHA1 Message Date
Adam Holt 90f1172206 Update stub implementation
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
2026-01-07 13:51:11 +01:00
Adam Holt ac128e2f40 Add logging stack interfaces and adapters
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
2026-01-07 13:02:24 +01:00
Copilot 80b0306557 Replace go-github-mock with stretchr/testify for actions/issues/projects tests (#1737)
* Initial plan

* migrate tests from go-github-mock to internal testify-based mock

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* address feedback in testmock helper

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* tweak testmock path matching edge case

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* refine testmock options and path matching

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* simplify matchPath and document delete endpoint

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* Replace go-github-mock usage in tests with shared HTTP mock helper

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* Replace go-github-mock usage in tests with shared HTTP mock helper

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* fix tests and lint after mock cleanup

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* Remove import completely

* Partial removal in repositories_test.go

* Final removal

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
Co-authored-by: JoannaaKL <joannaakl@github.com>
2026-01-06 10:45:29 +01:00
Sam Morrow 7d4a4a68c3 Document public repo access quirk for read-only tools 2026-01-05 16:05:24 +00:00
Sam Morrow c428f72863 Don't filter read-only repo tools (work on public repos without scope) 2026-01-05 16:05:24 +00:00
Sam Morrow c80976661e Mention OAuth scope challenges in server-configuration.md 2026-01-05 16:05:24 +00:00
Sam Morrow 9aef43596e Fix server-configuration.md scope filtering description 2026-01-05 16:05:24 +00:00
Sam Morrow 4deaa8321e Remove empty filter.go and document OAuth scope challenges 2026-01-05 16:05:24 +00:00
Sam Morrow f14f507a39 Add tip about editing PAT scopes in GitHub UI 2026-01-05 16:05:24 +00:00
Sam Morrow acd7929281 Document that GitHub App and server-to-server tokens are not filtered 2026-01-05 16:05:24 +00:00
Sam Morrow c2450ce96a Update pkg/scopes/filter.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-05 16:05:24 +00:00
Sam Morrow 39fed357f4 Remove manual scope-to-tools table from docs
The README already has auto-generated tool documentation with scopes.
Keep only the scope hierarchy explanation which is structural.
2026-01-05 16:05:24 +00:00
Sam Morrow 8afb4fb16e Only check scopes for classic PATs (ghp_ prefix)
- Scope filtering only applies to classic PATs which return X-OAuth-Scopes
- Fine-grained PATs and other token types skip filtering (all tools shown)
- Updated docs to clarify PAT filtering vs OAuth scope challenges
2026-01-05 16:05:24 +00:00
Sam Morrow f45b94a8f5 Make scope filtering always enabled (remove flag)
Scope filtering is now a built-in feature rather than a configurable option.
The server automatically fetches token scopes at startup and filters tools
accordingly. If scope detection fails, it logs a warning and continues with
all tools available.
2026-01-05 16:05:24 +00:00
Sam Morrow a19a159d0a Enable scope filtering by default 2026-01-05 16:05:24 +00:00
Sam Morrow 46b8cb63ac Add PAT scope filtering for stdio server
Add the ability to filter tools based on token scopes for PAT users.
This uses an HTTP HEAD request to GitHub's API to discover token scopes.

New components:
- pkg/scopes/filter.go: HasRequiredScopes checks if scopes satisfy tool requirements
- pkg/scopes/fetcher.go: FetchTokenScopes gets scopes via HTTP HEAD to GitHub API
- pkg/github/scope_filter.go: CreateScopeFilter creates inventory.ToolFilter

Integration:
- Add --filter-by-scope flag to stdio command (disabled by default)
- When enabled, fetches token scopes on startup
- Tools requiring unavailable scopes are hidden from tool list
- Gracefully continues without filtering if scope fetch fails (logs warning)

This allows the OSS server to have similar scope-based tool visibility
as the remote server, and the filter logic can be reused by remote server.
2026-01-05 16:05:24 +00:00
Sam Morrow 48744ca556 Sort scope slices for deterministic output
Map iteration in Go is non-deterministic, which causes doc generation
to produce different output on each run. Sort the scope slices in:
- ScopeSet.ToSlice()
- ScopeSet.ToStringSlice()
- ExpandScopes()
2026-01-05 15:54:17 +00:00
Sam Morrow cec5a1ae0f Fix conflict and regenerate docs after rebase 2026-01-05 15:54:17 +00:00
Sam Morrow df9fc6a3b3 Use repo scope for star/unstar tools instead of public_repo
public_repo is implicit - the GitHub API handles the distinction between
public and private repos. Using repo as the required scope is more
consistent with our enforcement model:
- PATs: tools visible if token has repo scope
- OAuth: scope challenge requests repo scope
2026-01-05 15:54:17 +00:00
Sam Morrow 3d1ae306f8 refres readme after update 2026-01-05 15:54:17 +00:00
Sam Morrow 7796c08681 Add scope hierarchy and auto-derive accepted scopes
- Add ScopeHierarchy map defining parent-child scope relationships
- Add ExpandScopes() function to derive accepted scopes from required scopes
- Update NewTool/NewToolFromHandler to take []scopes.Scope and auto-derive AcceptedScopes
- Add new scope constants: NoScope, User, ReadUser, UserEmail, ReadPackages, WritePackages
- Update all tool files to use new signature with typed scopes
- Add comprehensive tests for ExpandScopes

The scope hierarchy allows automatic derivation of accepted scopes:
- repo → public_repo, security_events
- admin:org → write:org → read:org
- project → read:project
- write:packages → read:packages
- user → read:user, user:email

This enables the remote server to consume scope info directly from OSS tools.
2026-01-05 15:54:17 +00:00
Sam Morrow c765101aeb refresh readme after rebase 2026-01-05 15:54:17 +00:00
copilot-swe-agent[bot] db179be4c3 Simplify scope implementation per feedback
- Replace NewToolWithScopes with updated NewTool that includes scope parameters
- All tools now use the same constructor with explicit scope requirements
- Documentation only shows accepted scopes when they differ from required
- Removed NewToolWithScopes and NewToolFromHandlerWithScopes helper functions

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
2026-01-05 15:54:17 +00:00
copilot-swe-agent[bot] db9f4e8ddf Complete OAuth scope implementation for all tools
- Updated all remaining tools with OAuth scope information
- Added scope documentation generation to generate-docs command
- Documentation now shows Required and Accepted OAuth scopes for each tool
- All 100+ tools now have scope information defined
- Tests pass, linter passes, documentation generated successfully

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
2026-01-05 15:54:17 +00:00
copilot-swe-agent[bot] 1e5931a2ab Update most tools with OAuth scope information
- Updated 60+ tools with required and accepted OAuth scopes
- Added scopes to: gists, git, notifications, projects, code scanning,
  dependabot, secret scanning, security advisories, actions, discussions,
  issues (partial), labels, pull requests (partial), repositories (partial), search (partial)
- Remaining: ~20 tools in issues, pullrequests, repositories, and search files

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
2026-01-05 15:54:17 +00:00
copilot-swe-agent[bot] eb6db0fb5d Add scopes package and update ServerTool struct with scope fields
- Created pkg/scopes package with OAuth scope constants
- Added RequiredScopes and AcceptedScopes fields to ServerTool
- Added NewToolWithScopes helpers in dependencies.go
- Updated context tools (get_me, get_teams, get_team_members) with scopes

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
2026-01-05 15:54:17 +00:00
Ksenia Bobrova 2b352ab0b9 Improvements to push_files tool (#1676)
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
* Fallback to default branch in get_file_contents when main doesn't exist

* Addressing review comments

* Improvements to push_files tool

* Fixed copilot comments

* Addressing review comments

* Remove debug statement
v0.27.0
2026-01-05 13:27:32 +01:00
Matt Holloway 905a08f8fb Update cmd/github-mcp-server/generate_docs.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-05 10:14:37 +00:00
Matt Holloway 67f3427d39 Update cmd/github-mcp-server/generate_docs.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-05 10:14:37 +00:00
Matt Holloway 6f7bf271ed refactor docs toolset gen 2026-01-05 10:14:37 +00:00
Matt Holloway cac11f2d34 exclude tools requiring ff from docs 2026-01-05 10:14:37 +00:00
majiayu000 116c574255 fix: filterToolsByName returns all matching tools for feature flag filtering
When multiple tools share the same name but have different feature flags
(like GetJobLogs and ActionsGetJobLogs both named "get_job_logs"),
filterToolsByName was only returning the first match. This caused the
remote server to fail with "unknown tool" error when the first matching
tool was disabled by feature flags, even though another variant was enabled.

The fix modifies filterToolsByName to return ALL tools with matching names,
allowing the feature flag filtering in AvailableTools to select the correct
variant based on the enabled flags.

Fixes #1714

Signed-off-by: majiayu000 <1835304752@qq.com>
2026-01-05 10:08:59 +00:00
Kun Chen 92bdc286bb add docs for Rovo Dev CLI installation 2026-01-05 06:57:57 +00:00
Adam Holt 762845a8b7 Add API Error annotations to GitHub issue errors (#1566)
* Add API Error annotations to GitHub issue errors

* Return an error back.

---------

Co-authored-by: Matt Holloway <mattdholloway@github.com>
2026-01-02 14:19:06 +00:00
lif 30712de5a6 docs: regenerate README after parameter rename
Update auto-generated documentation to reflect the issueNumber -> issue_number
parameter rename in assign_copilot_to_issue tool.
2025-12-31 18:53:12 +00:00
majiayu000 2cc6911d4b refactor: use consistent snake_case for issue_number parameter
Change the parameter name in assign_copilot_to_issue tool from
'issueNumber' (camelCase) to 'issue_number' (snake_case) to match
the naming convention used by all other tools in the issues toolset.

This improves API consistency and makes the tool parameters more
predictable for users and AI models.

Fixes #1239

Signed-off-by: majiayu000 <1835304752@qq.com>
2025-12-31 18:53:12 +00:00
copilot-swe-agent[bot] 953d26f9c0 fix: use gh pr checkout to handle fork PRs in license-check workflow
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
2025-12-31 18:49:43 +00:00
majiayu000 587d829a1b docs: add Docker image name to Prerequisites section
Add explicit Docker image URL (ghcr.io/github/github-mcp-server) to the
Prerequisites section for better discoverability.

Fixes #1505

Signed-off-by: majiayu000 <1835304752@qq.com>
2025-12-30 19:21:37 +00:00
s-sanjay af5a6dff42 Update README.md to hyperlink Open AI Codex installation guide
This guide was already added as part of https://github.com/github/github-mcp-server/pull/1340. Update README.md to point to this
2025-12-29 21:28:01 +00:00
dependabot[bot] 73a8f98bdc build(deps): bump actions/github-script from 7 to 8
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-29 21:24:40 +00:00
Matt Holloway 43bea59a19 Change list workflow runs to allow empty resource id to list all runs in repo (#1682)
* change list workflow runs to allow empty resource id to list all runs in repo

* update docs
2025-12-29 10:25:17 +00:00
tommaso-moro 1decd77b69 remove claude web 2025-12-24 14:47:21 +00:00
dependabot[bot] d4da526785 build(deps): bump docker/metadata-action from 5.9.0 to 5.10.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.9.0 to 5.10.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/318604b99e75e41977312d83839a89be02ca4893...c299e40c65443455700f0fdfc63efafe5b349051)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: 5.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-23 20:54:18 +00:00
Tiger Kaovilai 1f381723d3 fix: Skip CodeQL scanning on forked repositories
The CodeQL workflow requires security-events write permission and access
to internal GitHub registries/packs that aren't available in forks.
Adding a condition to only run on the main repository prevents workflow
failures in forked repositories.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-23 20:03:48 +00:00
Ksenia Bobrova 942607595c Fallback to default branch in get_file_contents when main doesn't exist (#1669)
* Fallback to default branch in get_file_contents when main doesn't exist

* Addressing review comments
2025-12-23 15:24:23 +01:00
github-actions[bot] 7e3262341c chore: regenerate license files
Auto-generated by license-check workflow
2025-12-23 13:32:04 +00:00
dependabot[bot] a1bc8b6fb9 build(deps): bump github.com/spf13/cobra from 1.10.1 to 1.10.2
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.10.1 to 1.10.2.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.10.1...v1.10.2)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-version: 1.10.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-23 13:32:04 +00:00
Tommaso Moro 95a637eb46 Update PR template to include tool renaming section (#1657)
* update pr template

* fix
2025-12-23 11:09:08 +00:00
copilot-swe-agent[bot] 8ac1eb46ff Use typed IconTheme constants from Go SDK
Replace string conversions with mcp.IconThemeLight and mcp.IconThemeDark
constants to match the SDK's typed IconTheme field. This fixes the CI build
errors where string literals were being used instead of the proper IconTheme type.

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
2025-12-22 23:18:29 +00:00
github-actions[bot] b28d7fbad9 chore: regenerate license files
Auto-generated by license-check workflow
2025-12-22 23:18:29 +00:00