Skip to content

bugs-tab - Fix count on repos that use types inconsistently - #10138

Merged
fregante merged 2 commits into
mainfrom
issue-count-revamped
Sep 28, 2026
Merged

fregante merged 2 commits into
mainfrom
issue-count-revamped

Conversation

@fregante

@fregante fregante commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Test URLs

https://github.com/microsoft/vscode/issues

{
	"data": {
		"repository": {
			"labels": {
				"nodes": [
					{
						"name": "bug",
						"issues": {
							"totalCount": 6105
						}
					},
					{
						"name": "debug",
						"issues": {
							"totalCount": 277
						}
					},
					{
						"name": "debug-disassembly",
						"issues": {
							"totalCount": 12
						}
					},
					{
						"name": "notebook-debugging",
						"issues": {
							"totalCount": 3
						}
					},
					{
						"name": "debug-console",
						"issues": {
							"totalCount": 19
						}
					},
					{
						"name": "debug-triggered-breakpoint",
						"issues": {
							"totalCount": 0
						}
					},
					{
						"name": "agent-debug-panel",
						"issues": {
							"totalCount": 1
						}
					},
					{
						"name": "copilot-cli-agent",
						"issues": {
							"totalCount": 137
						}
					},
					{
						"name": "chat-cloud-agent",
						"issues": {
							"totalCount": 47
						}
					},
					{
						"name": "notebook-language",
						"issues": {
							"totalCount": 4
						}
					}
				]
			},
			"typeBug": {
				"totalCount": 104
			},
			"issues": {
				"totalCount": 18440
			}
		}
	}
}
{
	"data": {
		"search": {
			"issueCount": 6113
		}
	}
}

Screenshot

Screenshot 4

@github-actions github-actions Bot added the bug label Sep 28, 2026
getFeatureRelatedIssuesQuery(featureId)
} repo:refined-github/refined-github`;
const response = await api.v3(
`/search/issues?q=${encodeURIComponent(query)}`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured this out because this search was returning 3 results in the title of #10137, whereas it only finds 2 issue/prs that mention the feature. This is because the default global search doesn't care for quoted phrases.

@@ -1,5 +1,5 @@
query CountExactBugs($query: String!) {
search(query: $query, type: ISSUE, first: 1) {
search(query: $query, type: ISSUE_ADVANCED, first: 1) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same limitation was here, with the legacy search type ISSUE did not support (x OR y) at all

@fregante
fregante merged commit a17fdb5 into main Sep 28, 2026
14 checks passed
@fregante
fregante deleted the issue-count-revamped branch September 28, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

bugs-tab undercounts bugs if repo uses labels and types inconsistently

1 participant