Repository navigation
Fix mentorship issue collisions across repositories - #5751
vianmangal wants to merge 3 commits into
Conversation
Signed-off-by: vian <viaanmangal@gmail.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Backend issue resolution backend/src/apps/mentorship/api/internal/nodes/module.py, backend/src/apps/mentorship/api/internal/utils.py, backend/src/apps/github/api/internal/nodes/issue.py, backend/tests/unit/apps/mentorship/api/internal/nodes/*, backend/tests/unit/apps/mentorship/api/internal/utils_test.py, backend/tests/unit/apps/github/api/internal/nodes/issue_test.py |
Resolvers accept GlobalID values and filter issues and task records by primary key. get_issue_pk validates issue IDs. Resolver tests cover issues with overlapping GitHub numbers. |
Issue management mutations backend/src/apps/mentorship/api/internal/mutations/module.py, backend/tests/unit/apps/mentorship/api/internal/mutations/module_mutation_test.py |
Assignment, unassignment, and deadline mutations accept GlobalID values and look up issues by primary key. Tests cover selection among issues with the same GitHub number. |
Frontend issue queries and navigation frontend/src/server/queries/issueQueries.ts, frontend/src/app/my/mentorship/programs/.../issues/[issueId]/page.tsx, frontend/src/app/my/mentorship/programs/.../mentees/[menteeKey]/page.tsx, frontend/src/components/IssuesTable.tsx, frontend/src/components/cards/ModuleIssues.tsx, frontend/src/hooks/useIssueMutations.ts, frontend/__tests__/* |
Issue queries and mutations pass issue IDs. Detail routes and click handlers use issue IDs, and tests verify distinct navigation for overlapping issue numbers. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix · Severity of issue fixed: Medium
Merge Risk: 
Minimal · up to edff9
-
Issue selection and actions now target the selected issue across repositories. No actionable merge-blocking risk was identified; this is ready for normal merge checks.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "Fix mentorship issue collisions across repositories" matches the main change. The PR replaces number-only issue lookups with the Nest issue ID in mentorship detail URLs, GraphQL queries, assignments, and deadline updates, so issues that share a GitHub number across repositories no longer collide. The title is concise and specific.
Full details: Description check
-
Explanation
The description is related to the changeset. It explains that mentorship modules can contain issues from multiple repositories with overlapping GitHub numbers. It states that the PR uses the Nest issue ID in detail URLs, GraphQL queries, assignments, and deadline updates. It also covers the caches, the shared issue table, the regression tests, the validation steps, and the compatibility impact (issueByNumber replaced by issueById, and number-only bookmarks not retained).
Full details: Linked Issues check
-
Explanation
Issue
#5747requires distinct issue links and correct actions when repositories share a GitHub issue number. The PR uses the Nest issue ID in detail routes, GraphQL queries, assignments, deadlines, interested-user lookups, and mentee lookups. Backend resolvers and mutations filter by issue primary key within the module. Frontend tests cover distinct URLs and collision-safe assignment and deadline operations. The changes preserve multi-repository issue support.
Full details: Out of Scope Changes check
-
Explanation
The reviewed changes support issue
#5747. The utility validates issue IDs, the cache keys use issue IDs, shared issue-table navigation uses selected issue IDs, GraphQL types and queries are updated, and regression tests cover the changed behavior. The issue-related test and compatibility changes have a direct connection to collision-safe issue selection. No unrelated change is established.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
All reported issues were addressed across 22 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Signed-off-by: vian <viaanmangal@gmail.com>
|
@vianmangal Hi! Please address SonarQube issues that were introduced in this PR: |
Signed-off-by: vian <viaanmangal@gmail.com>
|




Proposed change
Resolves #5747
Mentorship modules can contain issues from multiple repositories with overlapping GitHub numbers. Use the existing Nest issue ID in detail URLs, GraphQL queries, assignments, and deadline updates so each action targets the selected issue.
Key deadline and assignment-time caches by issue ID, and scope interested-user and mentee lookups to that issue. Update the shared issue table so mentee profiles also open the selected repository's issue. Multi-repository support and existing role checks are preserved.
Regenerate GraphQL types and add regression tests for overlapping numbers, distinct detail URLs, assignment isolation, invalid ID types and numeric ranges, and mutation refetches.
Validate numeric issue IDs against the database bigint range and return malformed IDs consistently as GraphQL errors. Collision tests cover assignment, unassignment, and setting or clearing deadlines.
Validation
make check-testpassed locally with exit code 0:GraphQL code generation completed with the pinned dependencies. Also verified the collision scenario using the real GraphQL schema and PostgreSQL, including assignments, deadlines, interests, mentees, and module boundaries. Fixture writes were rolled back.
Local Docker setup used longer dependency-download timeouts, bounded/recycled Jest workers, and Git-recorded file modes for Docker Desktop permission checks. Test selection, assertions, timeouts, coverage thresholds, pinned dependencies, and image digests were unchanged.
Compatibility
Internal mentorship operations now accept
issueId: ID!, andissueByIdreplacesissueByNumber. Detail URLs contain an encoded Nest issue ID. Existing number-only bookmarks are not retained because they can identify multiple issues. No database migration is required.Checklist