In ai/mcp/server/github-workflow/services/SyncService.mjs, the FETCH_RELEASES GraphQL query is called with a hardcoded limit: 100. This is a "magic number" that should be defined in a central configuration file for better maintainability.
const data = await GraphqlService.query(FETCH_RELEASES, {
owner: aiConfig.owner,
repo : aiConfig.repo,
limit: 100,
cursor
});
Task
- Move this hardcoded value to the
issueSync section of the configuration file at @ai/mcp/server/github-workflow/config.mjs.
- Create a new property named
releaseQueryLimit.
- Update
SyncService.mjs to import and use this new configuration value.
Discussion on Value
We should also evaluate if 100 is the optimal value.
- Pro (High Value): A larger number like 100 is efficient for the initial, full synchronization, as it reduces the number of round-trips to the GitHub API.
- Con (High Value): When there are only 1-2 new releases, fetching 100 is wasteful and consumes more API quota than necessary.
A value of 50 is proposed as a more balanced compromise. It significantly reduces the data fetched during incremental updates while remaining reasonably efficient for the initial full sync.
In
ai/mcp/server/github-workflow/services/SyncService.mjs, theFETCH_RELEASESGraphQL query is called with a hardcodedlimit: 100. This is a "magic number" that should be defined in a central configuration file for better maintainability.// ai/mcp/server/github-workflow/services/SyncService.mjs const data = await GraphqlService.query(FETCH_RELEASES, { owner: aiConfig.owner, repo : aiConfig.repo, limit: 100, // This should be a config value cursor });Task
issueSyncsection of the configuration file at@ai/mcp/server/github-workflow/config.mjs.releaseQueryLimit.SyncService.mjsto import and use this new configuration value.Discussion on Value
We should also evaluate if
100is the optimal value.A value of 50 is proposed as a more balanced compromise. It significantly reduces the data fetched during incremental updates while remaining reasonably efficient for the initial full sync.