Skip to content

feat: adding username and displayName normalisation (CM-1235) - #4244

Merged
ulemons merged 1 commit into
mainfrom
feat/steward-assignemnt
Jun 21, 2026
Merged

feat: adding username and displayName normalisation (CM-1235)#4244
ulemons merged 1 commit into
mainfrom
feat/steward-assignemnt

Conversation

@ulemons

@ulemons ulemons commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Support writing username and displayName of the steward on the assignemnt.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Performance improvement
  • Chore / dependency update
  • Documentation

CM-1235


Note

Medium Risk
Public steward shape changes (name removed) and assignment now writes profile data; existing stewards without rows will show null display fields until reassigned or backfilled.

Overview
Steward identity in API responses moves from a single name field to username and displayName (both nullable when not stored yet).

A new stewards table holds LFX username and display name keyed by Auth0 user_id. PUT /stewardships/{id}/steward accepts optional username and displayName (validated as an all-or-nothing pair); when both are sent, the handler upserts that row in the same transaction as the assignment. Steward lists from assignSteward, getStewardshipSummary, and package list queries now LEFT JOIN stewards so stored labels surface in JSON; assignments without profile data still work and return nulls for those fields.

OpenAPI and shared TypeScript types are updated to match.

Reviewed by Cursor Bugbot for commit bcdeec0. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
@ulemons ulemons self-assigned this Jun 21, 2026
Copilot AI review requested due to automatic review settings June 21, 2026 08:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the OSSPCKGS stewardship model to persist and surface steward identity labels by introducing username and displayName (nullable in responses when not stored yet), writing those values during assignment, and joining them into stewardship-related reads.

Changes:

  • Add a new stewards table keyed by user_id to store username + display_name.
  • Update stewardship assignment to optionally upsert steward profile data in the same transaction as the assignment.
  • Update stewardship/package list queries and public API schema/types to return username/displayName instead of a single name field.

Reviewed changes

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

Show a summary per file
File Description
services/libs/data-access-layer/src/osspckgs/stewardships.ts Adds steward-profile join for active stewards + upsert-on-assign support; updates steward record shape.
services/libs/data-access-layer/src/osspckgs/api.ts Extends package list steward aggregation JSON to include username/displayName via join.
backend/src/osspckgs/migrations/V1781600000__stewards-table.sql Introduces the stewards table schema for persisted profile labels.
backend/src/api/public/v1/stewardships/openapi.yaml Updates public API schema to expose username/displayName and accept them on assignment.
backend/src/api/public/v1/stewardships/assignSteward.ts Adds request validation for the optional username/displayName pair and passes through to DAL.
backend/src/api/public/v1/packages/types.ts Updates shared public types for steward shape (username/displayName nullable).

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

Comment thread services/libs/data-access-layer/src/osspckgs/stewardships.ts
Comment thread backend/src/api/public/v1/stewardships/assignSteward.ts
@ulemons
ulemons merged commit 029345a into main Jun 21, 2026
24 checks passed
@ulemons
ulemons deleted the feat/steward-assignemnt branch June 21, 2026 09:02
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.

2 participants