dosubot[bot] commented on issue #8853: URL: https://github.com/apache/incubator-devlake/issues/8853#issuecomment-4323326207
<!-- Answer --> You're absolutely right, apologies for the confusion. I was indeed looking at the `main` branch (commit `2c15ad88`) which corresponds to the older `v1.0.3-beta2` lineage and doesn't have the stale-issue cleanup code from PR #8820. I've now verified the [actual `v1.0.3-beta12` code at commit `1d21f199`](https://github.com/apache/incubator-devlake/blob/1d21f199783b24fc8486445337d922d8a58badd3/backend/plugins/github_graphql/tasks/issue_collector.go) and can confirm the bug: the unexported `requestedIssues map[int]missingGithubIssueRef` field is present on `GraphqlQueryIssueDetailWrapper` and `merico-ai/graphql`'s `writeQuery` will serialize it as a top-level `requestedIssues` selection on `Query`, causing GitHub's API to reject it. Your proposed fix is correct — moving `requestedIssues` out of the struct and into a closure-scoped variable (or onto `GithubTaskData`) would prevent it from being serialized into the GraphQL query. The `BuildQuery` closure already has access to `reqData` and can populate a `map[int]missingGithubIssueRef` in the enclosing scope, and the `ResponseParser` closure can read it back — exactly the same pattern already used for the `issueUpdatedAt` map on [L162](https://github.com/apache/incubator-devlake/blob/1d21f199783b24fc8486445337d922d8a58badd3/backend/plugins/github_graphql/tasks/issue_collector.go#L162). Looking forward to your PR! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fincubator-devlake).* --- Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fincubator-devlake). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fincubator-devlake#message_id=6e8b2c6d-e6c0-4bf7-a933-11900540a5eb) [](https://github.dosu.com/apache/incubator-devlake?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fincubator-devlake) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fincubator-devlake) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
