Skip to content

feat: single lookup (CM-1060)#3964

Merged
ulemons merged 37 commits intomainfrom
feat/single-lookup
Mar 30, 2026
Merged

feat: single lookup (CM-1060)#3964
ulemons merged 37 commits intomainfrom
feat/single-lookup

Conversation

@ulemons
Copy link
Copy Markdown
Contributor

@ulemons ulemons commented Mar 26, 2026

Note

Medium Risk
Adds a new public API route that returns verified emails and affiliations for a single GitHub handle, increasing surface area and potential for data exposure if scopes/inputs are misused. Logic reuses existing DAL queries but changes request shape and 404 behavior for missing handles.

Overview
Adds a new GET /public/v1/affiliations/:githubHandle endpoint to fetch affiliations for a single GitHub handle, alongside the existing bulk POST / lookup.

The handler lowercases the handle, looks up the member, returns a NotFoundError when no profile exists, and responds with the member’s display name, verified emails, and resolved affiliations (guarded by the existing READ_AFFILIATIONS scope and rate limiter).

Written by Cursor Bugbot for commit 35168c4. This will update automatically on new commits. Configure here.

@ulemons ulemons changed the base branch from main to feat/add-query-layer March 26, 2026 15:59
@ulemons ulemons force-pushed the feat/add-query-layer branch 2 times, most recently from 3b41f31 to 7377aae Compare March 27, 2026 13:42
Base automatically changed from feat/add-query-layer to main March 27, 2026 13:51
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ulemons ulemons self-assigned this Mar 27, 2026
@ulemons ulemons marked this pull request as ready for review March 27, 2026 14:09
Copilot AI review requested due to automatic review settings March 27, 2026 14:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new public v1 endpoint to fetch affiliations for a single contributor by GitHub handle, complementing the existing bulk lookup endpoint.

Changes:

  • Add GET /public/v1/affiliations/:githubHandle route.
  • Implement getAffiliationByHandle handler to resolve a member, verified emails, and affiliations, then return a single-contributor payload.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
backend/src/api/public/v1/affiliations/index.ts Registers the new GET route for single-handle lookup alongside the existing bulk POST endpoint.
backend/src/api/public/v1/affiliations/getAffiliationByHandle.ts New handler that looks up a member by GitHub handle and returns emails + resolved affiliations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ulemons ulemons requested a review from joanagmaia March 27, 2026 15:30
@ulemons ulemons force-pushed the feat/single-lookup branch from 0841e5a to c08fc7c Compare March 27, 2026 15:40
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

joanagmaia
joanagmaia previously approved these changes Mar 27, 2026
ulemons added 15 commits March 30, 2026 09:29
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
ulemons added 22 commits March 30, 2026 09:29
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
@ulemons ulemons force-pushed the feat/single-lookup branch from 710b7da to 35168c4 Compare March 30, 2026 07:29
@ulemons ulemons merged commit bfc1bae into main Mar 30, 2026
16 checks passed
@ulemons ulemons deleted the feat/single-lookup branch March 30, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants