As a developer, I want to specify which GitHub ProjectV2 board reminders should query from, so that we can support multiple projects in the future.
🧠 Context
Currently, the projectV2Items GraphQL query hardcodes the project number to 18:
- See:
src/github/graphql/projectV2Items.ts

This means reminder logic is tightly coupled to a single project board. To support multiple GitHub projects (e.g. for different teams, terms, or categories), we need to pass in the project number dynamically via query variables.
The query is executed in
src/infrastructure/github/functions/fetchProjectItems.ts.
We want to be able to pass in a project ID from this function so that reminders can be scoped per project.
There is no need to install a new GraphQL client — we already support query variables elsewhere in the codebase.
See src/infrastructure/github/functions/updateProjectItemAssignee.ts for an example of how variables are passed.
🛠️ Implementation Plan
-
Move Default Project Number to a Constant
-
Update the GraphQL Query
- In
src/github/graphql/projectV2Items.ts, replace the hardcoded number: 18 with a $projectNumber variable
- Declare
$projectNumber in the query’s variable block and use it in the projectV2(number: $projectNumber) field
-
Update Query Invocation
-
In fetchProjectItems.ts, accept a projectNumber parameter (with a fallback to DEFAULT_PROJECT_NUMBER)
-
Inject this variable into the GraphQL request:
const response = await axios.post(
"https://api.github.com/graphql",
{
query: PROJECT_V2_ITEMS,
variables: {
projectNumber: projectNumber ?? DEFAULT_PROJECT_NUMBER,
},
},
{ headers: { Authorization: `Bearer ${TOKEN}` } }
);
-
Follow Existing Patterns
- Refer to
updateProjectItemAssignee.ts for how query variables are structured and passed into the request body
-
Write Tests
- Write unit tests for
fetchProjectItems to confirm it supports variable input
- Use a mock query to verify the correct value is passed into the request body
✅ Acceptance Criteria
As a developer, I want to specify which GitHub ProjectV2 board reminders should query from, so that we can support multiple projects in the future.
🧠 Context
Currently, the
projectV2ItemsGraphQL query hardcodes the project number to18:src/github/graphql/projectV2Items.tsThis means reminder logic is tightly coupled to a single project board. To support multiple GitHub projects (e.g. for different teams, terms, or categories), we need to pass in the project number dynamically via query variables.
The query is executed in
src/infrastructure/github/functions/fetchProjectItems.ts.We want to be able to pass in a project ID from this function so that reminders can be scoped per project.
There is no need to install a new GraphQL client — we already support query variables elsewhere in the codebase.
See
src/infrastructure/github/functions/updateProjectItemAssignee.tsfor an example of how variables are passed.🛠️ Implementation Plan
Move Default Project Number to a Constant
Create a constant named
DEFAULT_PROJECT_NUMBERinsrc/infrastructure/github/constants.ts:Update the GraphQL Query
src/github/graphql/projectV2Items.ts, replace the hardcodednumber: 18with a$projectNumbervariable$projectNumberin the query’s variable block and use it in theprojectV2(number: $projectNumber)fieldUpdate Query Invocation
In
fetchProjectItems.ts, accept aprojectNumberparameter (with a fallback toDEFAULT_PROJECT_NUMBER)Inject this variable into the GraphQL request:
Follow Existing Patterns
updateProjectItemAssignee.tsfor how query variables are structured and passed into the request bodyWrite Tests
fetchProjectItemsto confirm it supports variable input✅ Acceptance Criteria
DEFAULT_PROJECT_NUMBERis defined insrc/infrastructure/github/constants.tsprojectV2Itemsquery insrc/github/graphql/projectV2Items.tsuses a$projectNumbervariable instead of hardcoding18fetchProjectItems.tsaccepts aprojectNumberparameter and injects it into the GraphQL request, defaulting toDEFAULT_PROJECT_NUMBERprojectNumbercan be dynamically passed intofetchProjectItems