github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

list_issues returns Pull Requests as well

Open peter-trost opened this issue 1 year ago • 2 comments

Describe the bug

The list_issues tool seems to return Pull Requests as well.

Affected version

server version v0.1.1 (7ab5d968e065f13a660cd123c2c5d0be6d8b6dbd) 2025-04-07T16:05:06Z

Steps to reproduce the behavior

  1. Add the MCP to you agent
  2. Ask them to list the issues in a repository that has Pull Requests open
  3. Observe the Pull Requests in the response of the tool call

Expected behavior

I expect list_issues to only return issues and list_pull_requests to only return pull requests.

Actual behavior

list_issues returns issues AND pull requests.

Logs

Tool call list_issues:

Image

{
  "owner": "Peetee06",
  "repo": "flutter-testing-concepts",
  "sort": "created",
  "direction": "asc",
  "state": "open",
  "perPage": 1,
  "page": 1
}

Response:

[
  {
    "id": 3008205521,
    "number": 32,
    "state": "open",
    "locked": false,
    "title": "chore(deps): bump analyzer from 7.3.0 to 7.4.1 in /bloc_app",
    "body": "Bumps [analyzer](https://github.com/dart-lang/sdk/tree/main/pkg) from 7.3.0 to 7.4.1.\n\u003cdetails\u003e\n\u003csummary\u003eCommits\u003c/summary\u003e\n\u003cul\u003e\n\u003cli\u003eSee full diff in \u003ca href=\"https://github.com/dart-lang/sdk/commits/HEAD/pkg\"\u003ecompare view\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/details\u003e\n\u003cbr /\u003e\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=analyzer\u0026package-manager=pub\u0026previous-version=7.3.0\u0026new-version=7.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003eDependabot commands and options\u003c/summary\u003e\n\u003cbr /\u003e\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot show \u003cdependency name\u003e ignore conditions` will show all of the ignore conditions of the specified dependency\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\n\u003c/details\u003e",
    "author_association": "CONTRIBUTOR",
    "user": {
      "login": "dependabot[bot]",
      "id": 49699333,
      "node_id": "MDM6Qm90NDk2OTkzMzM=",
      "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
      "html_url": "https://github.com/apps/dependabot",
      "gravatar_id": "",
      "type": "Bot",
      "site_admin": false,
      "url": "https://api.github.com/users/dependabot%5Bbot%5D",
      "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
      "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
      "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
      "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
      "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
      "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
      "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
      "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions"
    },
    "labels": [
      {
        "id": 8462766026,
        "url": "https://api.github.com/repos/Peetee06/flutter-testing-concepts/labels/dependencies",
        "name": "dependencies",
        "color": "0366d6",
        "description": "Pull requests that update a dependency file",
        "default": false,
        "node_id": "LA_kwDOOZdjn88AAAAB-GuPyg"
      },
      {
        "id": 8462766028,
        "url": "https://api.github.com/repos/Peetee06/flutter-testing-concepts/labels/dart",
        "name": "dart",
        "color": "000000",
        "description": "Pull requests that update dart code",
        "default": false,
        "node_id": "LA_kwDOOZdjn88AAAAB-GuPzA"
      }
    ],
    "comments": 2,
    "created_at": "2025-04-21T11:22:41Z",
    "updated_at": "2025-04-22T17:35:18Z",
    "url": "https://api.github.com/repos/Peetee06/flutter-testing-concepts/issues/32",
    "html_url": "https://github.com/Peetee06/flutter-testing-concepts/pull/32",
    "comments_url": "https://api.github.com/repos/Peetee06/flutter-testing-concepts/issues/32/comments",
    "events_url": "https://api.github.com/repos/Peetee06/flutter-testing-concepts/issues/32/events",
    "labels_url": "https://api.github.com/repos/Peetee06/flutter-testing-concepts/issues/32/labels{/name}",
    "repository_url": "https://api.github.com/repos/Peetee06/flutter-testing-concepts",
    "pull_request": {
      "url": "https://api.github.com/repos/Peetee06/flutter-testing-concepts/pulls/32",
      "html_url": "https://github.com/Peetee06/flutter-testing-concepts/pull/32",
      "diff_url": "https://github.com/Peetee06/flutter-testing-concepts/pull/32.diff",
      "patch_url": "https://github.com/Peetee06/flutter-testing-concepts/pull/32.patch"
    },
    "reactions": {
      "total_count": 0,
      "+1": 0,
      "-1": 0,
      "laugh": 0,
      "confused": 0,
      "heart": 0,
      "hooray": 0,
      "rocket": 0,
      "eyes": 0,
      "url": "https://api.github.com/repos/Peetee06/flutter-testing-concepts/issues/32/reactions"
    },
    "node_id": "PR_kwDOOZdjn86TSaGs",
    "draft": false
  }
]

peter-trost avatar Apr 23 '25 06:04 peter-trost

The API appears to do this, and I agree it would be better if it were cleanly split so the PR tools work with PRs and the issues tools only work with issues, so it's simpler for the LLM to comprehend. Thanks for your report.

SamMorrowDrums avatar Apr 23 '25 14:04 SamMorrowDrums

Hi @Peetee06, thank you for raising this.

We now have separate "Issues" and "Pull Requests" tools so the agent can search, get, list comments etc for each type without getting confused. These are available in Local GitHub MCP server (>=v0.6.0) and the Remote GitHub MCP server.

But please let us know if you're still experiencing any problems with this :)

LuluBeatson avatar Jul 17 '25 15:07 LuluBeatson