feat: adding username and display name - #4242
Closed
ulemons wants to merge 1 commit into
Closed
Conversation
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the OSSPCKGS stewardship assignment flow to persist a steward’s username and displayName at assignment time (stored on stewardship_stewards) and expose those fields through the data-access-layer and public API schemas/types.
Changes:
- Add
usernameanddisplay_namecolumns tostewardship_stewardsvia a new migration. - Update DAL stewardship assignment + read paths (and package list steward JSON) to include
username/displayName. - Update public API request validation/types and OpenAPI schemas to reflect the new fields.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| services/libs/data-access-layer/src/osspckgs/stewardships.ts | Writes/reads steward username + displayName in assignment + summary queries and maps them into DAL records. |
| services/libs/data-access-layer/src/osspckgs/api.ts | Extends package list stewards JSON aggregation to include username + displayName. |
| backend/src/osspckgs/migrations/V1781877251__stewardship-steward-name-username.sql | Adds username and display_name columns to stewardship_stewards. |
| backend/src/api/public/v1/stewardships/openapi.yaml | Updates StewardRecord schema with username + displayName. |
| backend/src/api/public/v1/stewardships/assignSteward.ts | Accepts optional username + displayName in request body and passes them through to DAL. |
| backend/src/api/public/v1/packages/types.ts | Updates the public Steward TypeScript type to include username + displayName. |
| backend/src/api/public/v1/akrites/openapi.yaml | Updates StewardEntry schema with username + displayName. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
18
to
+22
| export interface StewardshipStewardRecord { | ||
| id: string | ||
| stewardshipId: string | ||
| userId: string | ||
| name: string | null | ||
| username: string | null |
Comment on lines
92
to
+96
| return { | ||
| id: String(row.id), | ||
| stewardshipId: String(row.stewardship_id), | ||
| userId: String(row.user_id), | ||
| name: null, | ||
| username: row.username ? String(row.username) : null, |
Comment on lines
463
to
466
| SELECT COALESCE( | ||
| json_agg( | ||
| json_build_object('userId', ss.user_id, 'role', ss.role, 'assignedAt', ss.assigned_at) | ||
| json_build_object('userId', ss.user_id, 'username', ss.username, 'displayName', ss.display_name, 'role', ss.role, 'assignedAt', ss.assigned_at) | ||
| ORDER BY ss.assigned_at ASC |
Comment on lines
25
to
29
| export interface Steward { | ||
| userId: string | ||
| name: string | ||
| username: string | null | ||
| displayName: string | null | ||
| role: 'lead' | 'co_steward' |
Comment on lines
125
to
+129
| userId: | ||
| type: string | ||
| description: Auth0 sub of the assigned steward. | ||
| example: abc123 | ||
| name: | ||
| username: |
Comment on lines
+129
to
+134
| username: | ||
| type: | ||
| - string | ||
| - 'null' | ||
| description: Display name of the steward. Null if not available. | ||
| description: Username of the steward in LFX. Null if not provided at assignment time. | ||
| example: jonathanr |
Comment on lines
152
to
160
| userId: | ||
| type: string | ||
| name: | ||
| username: | ||
| type: string | ||
| nullable: true | ||
| displayName: | ||
| type: string | ||
| nullable: true | ||
| role: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Support writing
usernameanddisplayNameof the steward on the assignemnt.Type of change