From b9aa2e51a2e42568bc92575413bd6894ecdfbc6a Mon Sep 17 00:00:00 2001 From: Chris Penner Date: Fri, 14 Jun 2024 15:06:55 -0700 Subject: [PATCH 1/4] Include UserDisplayInfo on Tickets and Contributions in responses --- src/Share/Postgres/Contributions/Queries.hs | 33 ++++++++++----------- src/Share/Postgres/Tickets/Queries.hs | 26 ++++++++-------- src/Share/Web/Share/Branches/Impl.hs | 7 ++++- src/Share/Web/Share/Branches/Types.hs | 9 +++--- src/Share/Web/Share/Contributions/API.hs | 12 ++++---- src/Share/Web/Share/Contributions/Impl.hs | 31 ++++++++++++------- src/Share/Web/Share/Contributions/Types.hs | 15 +++++----- src/Share/Web/Share/Tickets/API.hs | 12 ++++---- src/Share/Web/Share/Tickets/Impl.hs | 31 ++++++++++++------- src/Share/Web/Share/Tickets/Types.hs | 11 +++---- 10 files changed, 104 insertions(+), 83 deletions(-) diff --git a/src/Share/Postgres/Contributions/Queries.hs b/src/Share/Postgres/Contributions/Queries.hs index 9eb02fb..16e6a07 100644 --- a/src/Share/Postgres/Contributions/Queries.hs +++ b/src/Share/Postgres/Contributions/Queries.hs @@ -25,6 +25,7 @@ import Data.List qualified as List import Data.Map qualified as Map import Data.Set qualified as Set import Data.Time (UTCTime) +import Safe (lastMay) import Share.Contribution (Contribution (..), ContributionStatus (..)) import Share.IDs import Share.Postgres qualified as PG @@ -35,7 +36,6 @@ import Share.Utils.API import Share.Web.Errors import Share.Web.Share.Contributions.API (ContributionTimelineCursor, ListContributionsCursor) import Share.Web.Share.Contributions.Types -import Safe (lastMay) createContribution :: -- | Author @@ -108,7 +108,7 @@ contributionByProjectIdAndNumber projectId contributionNumber = do shareContributionByProjectIdAndNumber :: ProjectId -> ContributionNumber -> - PG.Transaction e (Maybe ShareContribution) + PG.Transaction e (Maybe (ShareContribution UserId)) shareContributionByProjectIdAndNumber projectId contributionNumber = do PG.query1Row [PG.sql| @@ -126,7 +126,7 @@ shareContributionByProjectIdAndNumber projectId contributionNumber = do target_branch_contributor.handle, contribution.created_at, contribution.updated_at, - author.handle, + contribution.author_id, (SELECT COUNT(*) FROM comments comment WHERE comment.contribution_id = contribution.id AND comment.deleted_at IS NULL) as num_comments FROM contributions AS contribution JOIN projects AS project ON project.id = contribution.project_id @@ -135,7 +135,6 @@ shareContributionByProjectIdAndNumber projectId contributionNumber = do LEFT JOIN users AS source_branch_contributor ON source_branch_contributor.id = source_branch.contributor_id JOIN project_branches AS target_branch ON target_branch.id = contribution.target_branch LEFT JOIN users AS target_branch_contributor ON target_branch_contributor.id = target_branch.contributor_id - JOIN users AS author ON author.id = contribution.author_id WHERE contribution.project_id = #{projectId} AND contribution_number = #{contributionNumber} |] @@ -149,7 +148,7 @@ listContributionsByProjectId :: Maybe UserId -> Maybe ContributionStatus -> Maybe ContributionKindFilter -> - PG.Transaction e (Maybe (Cursor ListContributionsCursor), [ShareContribution]) + PG.Transaction e (Maybe (Cursor ListContributionsCursor), [ShareContribution UserId]) listContributionsByProjectId projectId limit mayCursor mayUserFilter mayStatusFilter mayKindFilter = do let kindFilter = case mayKindFilter of Nothing -> "true" @@ -164,7 +163,7 @@ listContributionsByProjectId projectId limit mayCursor mayUserFilter mayStatusFi (contribution.updated_at, contribution.id) < (#{beforeTime}, #{contributionId}) |] addCursor - <$> PG.queryListRows @ShareContribution + <$> PG.queryListRows @(ShareContribution UserId) [PG.sql| SELECT contribution.id, @@ -180,7 +179,7 @@ listContributionsByProjectId projectId limit mayCursor mayUserFilter mayStatusFi target_branch_contributor.handle, contribution.created_at, contribution.updated_at, - author.handle, + contribution.author_id, (SELECT COUNT(*) FROM comments comment WHERE comment.contribution_id = contribution.id AND comment.deleted_at IS NULL) as num_comments FROM contributions AS contribution JOIN projects AS project ON project.id = contribution.project_id @@ -189,7 +188,6 @@ listContributionsByProjectId projectId limit mayCursor mayUserFilter mayStatusFi LEFT JOIN users AS source_branch_contributor ON source_branch_contributor.id = source_branch.contributor_id JOIN project_branches AS target_branch ON target_branch.id = contribution.target_branch LEFT JOIN users AS target_branch_contributor ON target_branch_contributor.id = target_branch.contributor_id - JOIN users AS author ON author.id = contribution.author_id WHERE ^{kindFilter} AND ^{cursorFilter} @@ -200,7 +198,7 @@ listContributionsByProjectId projectId limit mayCursor mayUserFilter mayStatusFi LIMIT #{limit} |] where - addCursor :: [ShareContribution] -> (Maybe (Cursor ListContributionsCursor), [ShareContribution]) + addCursor :: [ShareContribution UserId] -> (Maybe (Cursor ListContributionsCursor), [ShareContribution UserId]) addCursor xs = ( lastMay xs <&> \(ShareContribution {updatedAt, contributionId}) -> Cursor (updatedAt, contributionId), @@ -285,7 +283,7 @@ listContributionsByUserId :: Maybe (Cursor (UTCTime, ContributionId)) -> Maybe ContributionStatus -> Maybe ContributionKindFilter -> - PG.Transaction e (Maybe (Cursor (UTCTime, ContributionId)), [ShareContribution]) + PG.Transaction e (Maybe (Cursor (UTCTime, ContributionId)), [ShareContribution UserId]) listContributionsByUserId callerUserId userId limit mayCursor mayStatusFilter mayKindFilter = do let kindFilter = case mayKindFilter of Nothing -> "true" @@ -300,7 +298,7 @@ listContributionsByUserId callerUserId userId limit mayCursor mayStatusFilter ma (contribution.updated_at, contribution.id) < (#{beforeTime}, #{contributionId}) |] addCursor - <$> PG.queryListRows @ShareContribution + <$> PG.queryListRows @(ShareContribution UserId) [PG.sql| SELECT contribution.id, @@ -316,7 +314,7 @@ listContributionsByUserId callerUserId userId limit mayCursor mayStatusFilter ma target_branch_contributor.handle, contribution.created_at, contribution.updated_at, - author.handle + contribution.author_id, (SELECT COUNT(*) FROM comments comment WHERE comment.contribution_id = contribution.id AND comment.deleted_at IS NULL) as num_comments FROM contributions AS contribution JOIN projects AS project ON project.id = contribution.project_id @@ -336,7 +334,7 @@ listContributionsByUserId callerUserId userId limit mayCursor mayStatusFilter ma LIMIT #{limit} |] where - addCursor :: [ShareContribution] -> (Maybe (Cursor ListContributionsCursor), [ShareContribution]) + addCursor :: [ShareContribution UserId] -> (Maybe (Cursor ListContributionsCursor), [ShareContribution UserId]) addCursor xs = ( lastMay xs <&> \(ShareContribution {updatedAt, contributionId}) -> Cursor (updatedAt, contributionId), @@ -345,12 +343,12 @@ listContributionsByUserId callerUserId userId limit mayCursor mayStatusFilter ma -- | Note: Doesn't perform auth checks, the assumption is that if you already have access to -- the branchId you have access to all associated contributions. -shareContributionsByBranchOf :: Traversal s t BranchId [ShareContribution] -> s -> PG.Transaction e t +shareContributionsByBranchOf :: Traversal s t BranchId [ShareContribution UserId] -> s -> PG.Transaction e t shareContributionsByBranchOf trav s = s & unsafePartsOf trav %%~ \branchIds -> do contributionsByBranch <- - ( PG.queryListRows @(PG.Only BranchId PG.:. ShareContribution) + ( PG.queryListRows @(PG.Only BranchId PG.:. ShareContribution UserId) [PG.sql| WITH source_branches(branch_id) AS ( SELECT * FROM ^{PG.singleColumnTable branchIds} @@ -370,7 +368,7 @@ shareContributionsByBranchOf trav s = target_branch_contributor.handle, contribution.created_at, contribution.updated_at, - author.handle, + contribution.author_id, (SELECT COUNT(*) FROM comments comment WHERE comment.contribution_id = contribution.id AND comment.deleted_at IS NULL) as num_comments FROM source_branches JOIN project_branches AS source_branch ON source_branch.id = source_branches.branch_id @@ -380,9 +378,8 @@ shareContributionsByBranchOf trav s = LEFT JOIN users AS source_branch_contributor ON source_branch_contributor.id = source_branch.contributor_id JOIN project_branches AS target_branch ON target_branch.id = contribution.target_branch LEFT JOIN users AS target_branch_contributor ON target_branch_contributor.id = target_branch.contributor_id - JOIN users AS author ON author.id = contribution.author_id |] - <&> ( \(results :: [PG.Only BranchId PG.:. ShareContribution]) -> + <&> ( \(results :: [PG.Only BranchId PG.:. ShareContribution UserId]) -> -- Group by the source branch Id. results & fmap diff --git a/src/Share/Postgres/Tickets/Queries.hs b/src/Share/Postgres/Tickets/Queries.hs index 1b2716a..c5dd08c 100644 --- a/src/Share/Postgres/Tickets/Queries.hs +++ b/src/Share/Postgres/Tickets/Queries.hs @@ -21,6 +21,7 @@ import Control.Lens import Control.Monad.Except import Data.List qualified as List import Data.Time (UTCTime) +import Safe (lastMay) import Share.IDs import Share.Postgres qualified as PG import Share.Prelude @@ -30,7 +31,6 @@ import Share.Web.Errors import Share.Web.Share.Comments import Share.Web.Share.Tickets.API import Share.Web.Share.Tickets.Types -import Safe (lastMay) createTicket :: -- | Author @@ -91,9 +91,9 @@ ticketByProjectIdAndNumber projectId ticketNumber = do shareTicketByProjectIdAndNumber :: ProjectId -> TicketNumber -> - PG.Transaction e (Maybe ShareTicket) + PG.Transaction e (Maybe (ShareTicket UserId)) shareTicketByProjectIdAndNumber projectId ticketNumber = do - PG.query1Row @ShareTicket + PG.query1Row @(ShareTicket UserId) [PG.sql| SELECT ticket.id, @@ -105,12 +105,11 @@ shareTicketByProjectIdAndNumber projectId ticketNumber = do ticket.status, ticket.created_at, ticket.updated_at, - author.handle, + ticket.author_id, (SELECT COUNT(*) FROM comments comment WHERE comment.ticket_id = ticket.id AND comment.deleted_at IS NULL) as num_comments FROM tickets AS ticket JOIN projects AS project ON project.id = ticket.project_id JOIN users AS project_owner ON project_owner.id = project.owner_user_id - JOIN users AS author ON author.id = ticket.author_id WHERE ticket.project_id = #{projectId} AND ticket_number = #{ticketNumber} |] @@ -123,7 +122,7 @@ listTicketsByProjectId :: Maybe (Cursor ListTicketsCursor) -> Maybe UserId -> Maybe TicketStatus -> - PG.Transaction e (Maybe (Cursor ListTicketsCursor), [ShareTicket]) + PG.Transaction e (Maybe (Cursor ListTicketsCursor), [(ShareTicket UserId)]) listTicketsByProjectId projectId limit mayCursor mayUserFilter mayStatusFilter = do let cursorFilter = case mayCursor of Nothing -> "true" @@ -132,7 +131,7 @@ listTicketsByProjectId projectId limit mayCursor mayUserFilter mayStatusFilter = (ticket.updated_at, ticket.id) < (#{beforeTime}, #{ticketId}) |] addCursor - <$> PG.queryListRows @ShareTicket + <$> PG.queryListRows @(ShareTicket UserId) [PG.sql| SELECT ticket.id, @@ -144,12 +143,11 @@ listTicketsByProjectId projectId limit mayCursor mayUserFilter mayStatusFilter = ticket.status, ticket.created_at, ticket.updated_at, - author.handle, + ticket.author_id, (SELECT COUNT(*) FROM comments comment WHERE comment.ticket_id = ticket.id AND comment.deleted_at IS NULL) as num_comments FROM tickets AS ticket JOIN projects AS project ON project.id = ticket.project_id JOIN users AS project_owner ON project_owner.id = project.owner_user_id - JOIN users AS author ON author.id = ticket.author_id WHERE ^{cursorFilter} AND project.id = #{projectId} @@ -159,7 +157,7 @@ listTicketsByProjectId projectId limit mayCursor mayUserFilter mayStatusFilter = LIMIT #{limit} |] where - addCursor :: [ShareTicket] -> (Maybe (Cursor ListTicketsCursor), [ShareTicket]) + addCursor :: [ShareTicket UserId] -> (Maybe (Cursor ListTicketsCursor), [ShareTicket UserId]) addCursor xs = ( lastMay xs <&> \(ShareTicket {updatedAt, ticketId}) -> Cursor (updatedAt, ticketId), @@ -289,7 +287,7 @@ listTicketsByUserId :: Limit -> Maybe (Cursor (UTCTime, TicketId)) -> Maybe TicketStatus -> - PG.Transaction e (Maybe (Cursor (UTCTime, TicketId)), [ShareTicket]) + PG.Transaction e (Maybe (Cursor (UTCTime, TicketId)), [ShareTicket UserId]) listTicketsByUserId callerUserId userId limit mayCursor mayStatusFilter = do let cursorFilter = case mayCursor of Nothing -> "true" @@ -298,7 +296,7 @@ listTicketsByUserId callerUserId userId limit mayCursor mayStatusFilter = do (ticket.updated_at, ticket.id) < (#{beforeTime}, #{ticketId}) |] addCursor - <$> PG.queryListRows @ShareTicket + <$> PG.queryListRows @(ShareTicket UserId) [PG.sql| SELECT ticket.id, @@ -310,7 +308,7 @@ listTicketsByUserId callerUserId userId limit mayCursor mayStatusFilter = do ticket.status, ticket.created_at, ticket.updated_at, - author.handle, + ticket.author_id, (SELECT COUNT(*) FROM comments comment WHERE comment.ticket_id = ticket.id AND comment.deleted_at IS NULL) as num_comments FROM tickets AS ticket JOIN projects AS project ON project.id = ticket.project_id @@ -329,7 +327,7 @@ listTicketsByUserId callerUserId userId limit mayCursor mayStatusFilter = do LIMIT #{limit} |] where - addCursor :: [ShareTicket] -> (Maybe (Cursor ListTicketsCursor), [ShareTicket]) + addCursor :: [ShareTicket UserId] -> (Maybe (Cursor ListTicketsCursor), [ShareTicket UserId]) addCursor xs = ( lastMay xs <&> \(ShareTicket {updatedAt, ticketId}) -> Cursor (updatedAt, ticketId), diff --git a/src/Share/Web/Share/Branches/Impl.hs b/src/Share/Web/Share/Branches/Impl.hs index 49ffbf1..8a1a6cf 100644 --- a/src/Share/Web/Share/Branches/Impl.hs +++ b/src/Share/Web/Share/Branches/Impl.hs @@ -22,6 +22,7 @@ import Share.Postgres.Causal.Queries qualified as CausalQ import Share.Postgres.Contributions.Queries qualified as ContributionsQ import Share.Postgres.IDs (CausalId) import Share.Postgres.Queries qualified as Q +import Share.Postgres.Users.Queries qualified as UsersQ import Share.Prelude import Share.Project (Project (..)) import Share.Project qualified as Project @@ -330,7 +331,9 @@ getProjectBranchDetailsEndpoint (AuthN.MaybeAuthedUserID callerUserId) userHandl pure (project, projectOwner, projectBranchWithCausals) _authZReceipt <- AuthZ.permissionGuard $ AuthZ.checkProjectBranchRead callerUserId project PG.runTransaction $ do - branchContributions <- ContributionsQ.shareContributionsByBranchOf id projectBranchId + branchContributions <- + ContributionsQ.shareContributionsByBranchOf id projectBranchId + >>= UsersQ.userDisplayInfoOf (traversed . traversed) let shareProject = projectToAPI projectOwner project pure $ API.branchToShareBranch branchShortHand projectBranch shareProject branchContributions @@ -400,6 +403,7 @@ listBranchesByProjectEndpoint (AuthN.MaybeAuthedUserID callerUserId) userHandle branches & fmap (\(branch@(Branch {branchId}), contributorHandle) -> (branch, branchId, contributorHandle)) & ContributionsQ.shareContributionsByBranchOf (traversed . _2) + >>= UsersQ.userDisplayInfoOf (traversed . _2 . traversed . traversed) CausalQ.expectCausalHashesByIdsOf (traversed . _1 . branchCausals_) branchesWithContributions let shareProject = projectToAPI projectOwner project @@ -484,6 +488,7 @@ listBranchesByUserEndpoint (AuthN.MaybeAuthedUserID callerUserId) contributorHan & ContributionsQ.shareContributionsByBranchOf (traversed . _2) branchesWithContributions & CausalQ.expectCausalHashesByIdsOf (traversed . _1 . branchCausals_) + >>= UsersQ.userDisplayInfoOf (traversed . _2 . traversed . traversed) let shareBranches = expandedBranches diff --git a/src/Share/Web/Share/Branches/Types.hs b/src/Share/Web/Share/Branches/Types.hs index 8b3da27..dcd4d2b 100644 --- a/src/Share/Web/Share/Branches/Types.hs +++ b/src/Share/Web/Share/Branches/Types.hs @@ -7,16 +7,17 @@ module Share.Web.Share.Branches.Types where import Data.Aeson import Data.Time (UTCTime) +import Servant (FromHttpApiData) +import Servant.API (FromHttpApiData (..)) import Share.Branch (Branch (..)) import Share.IDs import Share.IDs qualified as IDs import Share.Postgres.IDs import Share.Web.Share.Contributions.Types (ShareContribution) import Share.Web.Share.Projects.Types -import Servant (FromHttpApiData) -import Servant.API (FromHttpApiData (..)) +import Share.Web.Share.Types (UserDisplayInfo) -branchToShareBranch :: BranchShortHand -> Branch CausalHash -> APIProject -> [ShareContribution] -> ShareBranch +branchToShareBranch :: BranchShortHand -> Branch CausalHash -> APIProject -> [ShareContribution UserDisplayInfo] -> ShareBranch branchToShareBranch branchShortHand Branch {createdAt, updatedAt, causal} project contributions = do ShareBranch { branchShortHand, @@ -33,7 +34,7 @@ data ShareBranch = ShareBranch updatedAt :: UTCTime, causalHash :: PrefixedHash "#" CausalHash, project :: APIProject, - contributions :: [ShareContribution] + contributions :: [ShareContribution UserDisplayInfo] } instance ToJSON ShareBranch where diff --git a/src/Share/Web/Share/Contributions/API.hs b/src/Share/Web/Share/Contributions/API.hs index 3f2a54f..cc570a9 100644 --- a/src/Share/Web/Share/Contributions/API.hs +++ b/src/Share/Web/Share/Contributions/API.hs @@ -4,6 +4,7 @@ module Share.Web.Share.Contributions.API where import Data.Time (UTCTime) +import Servant import Share.Contribution (ContributionStatus) import Share.IDs import Share.Utils.API @@ -12,7 +13,6 @@ import Share.Web.Share.Comments.API qualified as Comments import Share.Web.Share.Contributions.Types import Share.Web.Share.Diffs.Types (ShareNamespaceDiffResponse) import Share.Web.Share.Types (UserDisplayInfo) -import Servant type ContributionsByUserAPI = ListContributionsByUserEndpoint @@ -47,7 +47,7 @@ type ListContributionsByProjectEndpoint = :> QueryParam "status" ContributionStatus -- Filter the contributions by the kind of their source branch :> QueryParam "kind" ContributionKindFilter - :> Get '[JSON] (Paged ListContributionsCursor ShareContribution) + :> Get '[JSON] (Paged ListContributionsCursor (ShareContribution UserDisplayInfo)) type ListContributionsByUserEndpoint = QueryParam "cursor" (Cursor ListContributionsCursor) @@ -56,17 +56,17 @@ type ListContributionsByUserEndpoint = :> QueryParam "status" ContributionStatus -- Filter the contributions by the kind of their source branch :> QueryParam "kind" ContributionKindFilter - :> Get '[JSON] (Paged ListContributionsCursor ShareContribution) + :> Get '[JSON] (Paged ListContributionsCursor (ShareContribution UserDisplayInfo)) type CreateContribution = ReqBody '[JSON] CreateContributionRequest - :> Post '[JSON] ShareContribution + :> Post '[JSON] (ShareContribution UserDisplayInfo) -type GetContributionByNumber = Get '[JSON] ShareContribution +type GetContributionByNumber = Get '[JSON] (ShareContribution UserDisplayInfo) type UpdateContributionByNumber = ReqBody '[JSON] UpdateContributionRequest - :> Patch '[JSON] ShareContribution + :> Patch '[JSON] (ShareContribution UserDisplayInfo) type MergeContribution = Post '[JSON] () diff --git a/src/Share/Web/Share/Contributions/Impl.hs b/src/Share/Web/Share/Contributions/Impl.hs index aa27560..0db2a00 100644 --- a/src/Share/Web/Share/Contributions/Impl.hs +++ b/src/Share/Web/Share/Contributions/Impl.hs @@ -12,6 +12,8 @@ module Share.Web.Share.Contributions.Impl ) where +import Control.Lens +import Servant import Share.Branch (Branch (..)) import Share.Codebase qualified as Codebase import Share.Contribution @@ -22,7 +24,7 @@ import Share.Postgres qualified as PG import Share.Postgres.Causal.Queries qualified as CausalQ import Share.Postgres.Contributions.Queries qualified as ContributionsQ import Share.Postgres.Queries qualified as Q -import Share.Postgres.Users.Queries (userDisplayInfoOf) +import Share.Postgres.Users.Queries qualified as UsersQ import Share.Prelude import Share.Project import Share.User qualified as User @@ -42,7 +44,6 @@ import Share.Web.Share.Contributions.Types import Share.Web.Share.Diffs.Impl qualified as Diffs import Share.Web.Share.Diffs.Types (ShareNamespaceDiffResponse (..)) import Share.Web.Share.Types (UserDisplayInfo) -import Servant contributionsByProjectServer :: Maybe Session -> UserHandle -> ProjectSlug -> ServerT API.ContributionsByProjectAPI WebApp contributionsByProjectServer session handle projectSlug = @@ -90,7 +91,7 @@ listContributionsByProjectEndpoint :: Maybe (IDs.PrefixedID "@" UserHandle) -> Maybe ContributionStatus -> Maybe ContributionKindFilter -> - WebApp (Paged ListContributionsCursor ShareContribution) + WebApp (Paged ListContributionsCursor (ShareContribution UserDisplayInfo)) listContributionsByProjectEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) handle projectSlug cursor mayLimit authorFilter statusFilter kindFilter = do (project@Project {projectId}, authorUserId) <- PG.runTransactionOrRespondError $ do project <- Q.projectByShortHand projectShorthand `whenNothingM` throwError (EntityMissing (ErrorID "project:missing") "Project not found") @@ -98,7 +99,9 @@ listContributionsByProjectEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) han User.user_id <$> Q.userByHandle authorHandle `whenNothingM` throwError (EntityMissing (ErrorID "user:missing") "User not found") pure (project, authorFilterID) _authReceipt <- AuthZ.permissionGuard $ AuthZ.checkContributionListByProject mayCallerUserId project - (nextCursor, contributions) <- PG.runTransaction $ ContributionsQ.listContributionsByProjectId projectId limit cursor authorUserId statusFilter kindFilter + (nextCursor, contributions) <- PG.runTransaction $ do + ContributionsQ.listContributionsByProjectId projectId limit cursor authorUserId statusFilter kindFilter + >>= UsersQ.userDisplayInfoOf (_2 . traversed . traversed) pure $ Paged {items = contributions, cursor = nextCursor} where limit = fromMaybe 20 mayLimit @@ -109,7 +112,7 @@ createContributionEndpoint :: UserHandle -> ProjectSlug -> CreateContributionRequest -> - WebApp ShareContribution + WebApp (ShareContribution UserDisplayInfo) createContributionEndpoint session userHandle projectSlug (CreateContributionRequest {title, description, status, sourceBranchShortHand, targetBranchShortHand}) = do callerUserId <- AuthN.requireAuthenticatedUser session (project@Project {projectId}, Branch {branchId = sourceBranchId}, Branch {branchId = targetBranchId}) <- PG.runTransactionOrRespondError $ do @@ -121,6 +124,7 @@ createContributionEndpoint session userHandle projectSlug (CreateContributionReq PG.runTransactionOrRespondError $ do (_, contributionNumber) <- ContributionsQ.createContribution callerUserId projectId title description status sourceBranchId targetBranchId ContributionsQ.shareContributionByProjectIdAndNumber projectId contributionNumber `whenNothingM` throwError (InternalServerError "create-contribution-error" internalServerError) + >>= UsersQ.userDisplayInfoOf traversed where projectShorthand = IDs.ProjectShortHand {userHandle, projectSlug} @@ -129,11 +133,13 @@ getContributionByNumberEndpoint :: UserHandle -> ProjectSlug -> IDs.ContributionNumber -> - WebApp ShareContribution + WebApp (ShareContribution UserDisplayInfo) getContributionByNumberEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) userHandle projectSlug contributionNumber = do (project, shareContribution) <- PG.runTransactionOrRespondError $ do project@Project {projectId} <- Q.projectByShortHand projectShorthand `whenNothingM` throwError (EntityMissing (ErrorID "project:missing") "Project not found") - shareContribution <- ContributionsQ.shareContributionByProjectIdAndNumber projectId contributionNumber `whenNothingM` throwError (EntityMissing (ErrorID "contribution:missing") "Contribution not found") + shareContribution <- + ContributionsQ.shareContributionByProjectIdAndNumber projectId contributionNumber `whenNothingM` throwError (EntityMissing (ErrorID "contribution:missing") "Contribution not found") + >>= UsersQ.userDisplayInfoOf traversed pure (project, shareContribution) _authZReceipt <- AuthZ.permissionGuard $ AuthZ.checkContributionRead mayCallerUserId project pure shareContribution @@ -146,7 +152,7 @@ updateContributionByNumberEndpoint :: ProjectSlug -> IDs.ContributionNumber -> UpdateContributionRequest -> - WebApp ShareContribution + WebApp (ShareContribution UserDisplayInfo) updateContributionByNumberEndpoint session handle projectSlug contributionNumber updateRequest@UpdateContributionRequest {title, description, status, sourceBranchSH, targetBranchSH} = do callerUserId <- AuthN.requireAuthenticatedUser session (contribution@Contribution {contributionId, projectId, number = contributionNumber}, maySourceBranch, mayTargetBranch) <- PG.runTransactionOrRespondError $ do @@ -159,6 +165,7 @@ updateContributionByNumberEndpoint session handle projectSlug contributionNumber PG.runTransactionOrRespondError $ do _ <- ContributionsQ.updateContribution callerUserId contributionId title description status (branchId <$> maySourceBranch) (branchId <$> mayTargetBranch) ContributionsQ.shareContributionByProjectIdAndNumber projectId contributionNumber `whenNothingM` throwError (EntityMissing (ErrorID "contribution:missing") "Contribution not found") + >>= UsersQ.userDisplayInfoOf traversed where projectShorthand = IDs.ProjectShortHand {userHandle = handle, projectSlug} @@ -176,7 +183,7 @@ getContributionTimelineEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) userHa (nextCursor, shareContributionTimeline) <- ContributionsQ.getPagedShareContributionTimelineByProjectIdAndNumber projectId contributionNumber (unCursor <$> mayCursor) limit shareContributionsTimelineWithUserInfo <- shareContributionTimeline - & userDisplayInfoOf (traverse . traverse) + & UsersQ.userDisplayInfoOf (traverse . traverse) pure (project, shareContributionsTimelineWithUserInfo, nextCursor) _authZReceipt <- AuthZ.permissionGuard $ AuthZ.checkContributionRead mayCallerUserId project pure $ Paged {items = shareContributionTimeline, cursor = Cursor <$> nextCursor} @@ -191,11 +198,13 @@ listContributionsByUserEndpoint :: Maybe Limit -> Maybe ContributionStatus -> Maybe ContributionKindFilter -> - WebApp (Paged ListContributionsCursor ShareContribution) + WebApp (Paged ListContributionsCursor (ShareContribution UserDisplayInfo)) listContributionsByUserEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) userHandle mayCursor mayLimit statusFilter kindFilter = do (contributions, nextCursor) <- PG.runTransactionOrRespondError $ do user <- Q.userByHandle userHandle `whenNothingM` throwError (EntityMissing (ErrorID "user:missing") "User not found") - (nextCursor, contributions) <- ContributionsQ.listContributionsByUserId mayCallerUserId (User.user_id user) limit mayCursor statusFilter kindFilter + (nextCursor, contributions) <- + ContributionsQ.listContributionsByUserId mayCallerUserId (User.user_id user) limit mayCursor statusFilter kindFilter + >>= UsersQ.userDisplayInfoOf (_2 . traversed . traversed) pure (contributions, nextCursor) pure $ Paged {items = contributions, cursor = nextCursor} where diff --git a/src/Share/Web/Share/Contributions/Types.hs b/src/Share/Web/Share/Contributions/Types.hs index c5255e2..b0206a7 100644 --- a/src/Share/Web/Share/Contributions/Types.hs +++ b/src/Share/Web/Share/Contributions/Types.hs @@ -8,16 +8,17 @@ module Share.Web.Share.Contributions.Types where import Data.Aeson import Data.Time (UTCTime) +import Servant (FromHttpApiData) +import Servant.API (FromHttpApiData (..)) import Share.Contribution (ContributionStatus) import Share.IDs import Share.Postgres qualified as PG import Share.Prelude import Share.Utils.API (NullableUpdate, parseNullableUpdate) import Share.Web.Share.Comments (CommentEvent (..), commentEventTimestamp) -import Servant (FromHttpApiData) -import Servant.API (FromHttpApiData (..)) +import Share.Web.Share.Types (UserDisplayInfo) -data ShareContribution = ShareContribution +data ShareContribution user = ShareContribution { contributionId :: ContributionId, projectShortHand :: ProjectShortHand, number :: ContributionNumber, @@ -29,12 +30,12 @@ data ShareContribution = ShareContribution createdAt :: UTCTime, updatedAt :: UTCTime, -- This is optional so we can delete users without deleting ALL their contributions. - author :: Maybe UserHandle, + author :: Maybe user, numComments :: Int32 } - deriving (Show, Eq, Ord) + deriving stock (Show, Eq, Ord, Functor, Foldable, Traversable) -instance PG.DecodeRow ShareContribution where +instance PG.DecodeRow (ShareContribution UserId) where decodeRow = do contributionId <- PG.decodeField number <- PG.decodeField @@ -59,7 +60,7 @@ instance PG.DecodeRow ShareContribution where let targetBranchShortHand = BranchShortHand {branchName = targetBranchName, contributorHandle = targetBranchContributorHandle} pure ShareContribution {..} -instance ToJSON ShareContribution where +instance ToJSON (ShareContribution UserDisplayInfo) where toJSON ShareContribution {..} = object [ "id" .= contributionId, diff --git a/src/Share/Web/Share/Tickets/API.hs b/src/Share/Web/Share/Tickets/API.hs index c6fe0d3..92d5e1e 100644 --- a/src/Share/Web/Share/Tickets/API.hs +++ b/src/Share/Web/Share/Tickets/API.hs @@ -4,13 +4,13 @@ module Share.Web.Share.Tickets.API where import Data.Time (UTCTime) +import Servant import Share.IDs import Share.Ticket import Share.Utils.API import Share.Web.Share.Comments.API qualified as Comments import Share.Web.Share.Tickets.Types import Share.Web.Share.Types (UserDisplayInfo) -import Servant type TicketsByUserAPI = ListTicketsByUserEndpoint @@ -38,24 +38,24 @@ type ListTicketsByProjectEndpoint = -- Only return contributions by this author :> QueryParam "author" (PrefixedID "@" UserHandle) :> QueryParam "status" TicketStatus - :> Get '[JSON] (Paged ListTicketsCursor ShareTicket) + :> Get '[JSON] (Paged ListTicketsCursor (ShareTicket UserDisplayInfo)) type ListTicketsByUserEndpoint = QueryParam "cursor" (Cursor ListTicketsCursor) -- Return a maximimum of this many branches :> QueryParam "limit" Limit :> QueryParam "status" TicketStatus - :> Get '[JSON] (Paged ListTicketsCursor ShareTicket) + :> Get '[JSON] (Paged ListTicketsCursor (ShareTicket UserDisplayInfo)) type CreateTicketEndpoint = ReqBody '[JSON] CreateTicketRequest - :> Post '[JSON] ShareTicket + :> Post '[JSON] (ShareTicket UserDisplayInfo) -type GetTicketByNumber = Get '[JSON] ShareTicket +type GetTicketByNumber = Get '[JSON] (ShareTicket UserDisplayInfo) type UpdateTicketByNumber = ReqBody '[JSON] UpdateTicketRequest - :> Patch '[JSON] ShareTicket + :> Patch '[JSON] (ShareTicket UserDisplayInfo) type TicketTimelineCursor = UTCTime diff --git a/src/Share/Web/Share/Tickets/Impl.hs b/src/Share/Web/Share/Tickets/Impl.hs index bfe6cf8..57652ef 100644 --- a/src/Share/Web/Share/Tickets/Impl.hs +++ b/src/Share/Web/Share/Tickets/Impl.hs @@ -10,13 +10,15 @@ module Share.Web.Share.Tickets.Impl ) where +import Control.Lens +import Servant import Share.IDs (ProjectSlug (..), UserHandle) import Share.IDs qualified as IDs import Share.OAuth.Session import Share.Postgres qualified as PG import Share.Postgres.Queries qualified as Q import Share.Postgres.Tickets.Queries qualified as TicketsQ -import Share.Postgres.Users.Queries (userDisplayInfoOf) +import Share.Postgres.Users.Queries qualified as UsersQ import Share.Prelude import Share.Project import Share.Ticket @@ -33,7 +35,6 @@ import Share.Web.Share.Tickets.API import Share.Web.Share.Tickets.API qualified as API import Share.Web.Share.Tickets.Types import Share.Web.Share.Types (UserDisplayInfo) -import Servant ticketsByProjectServer :: Maybe Session -> UserHandle -> ProjectSlug -> ServerT API.TicketsByProjectAPI WebApp ticketsByProjectServer session handle projectSlug = @@ -78,7 +79,7 @@ listTicketsByProjectEndpoint :: Maybe Limit -> Maybe (IDs.PrefixedID "@" UserHandle) -> Maybe TicketStatus -> - WebApp (Paged ListTicketsCursor ShareTicket) + WebApp (Paged ListTicketsCursor (ShareTicket UserDisplayInfo)) listTicketsByProjectEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) handle projectSlug cursor mayLimit authorFilter statusFilter = do (project@Project {projectId}, authorUserId) <- PG.runTransactionOrRespondError $ do project <- Q.projectByShortHand projectShorthand `whenNothingM` throwError (EntityMissing (ErrorID "project:missing") "Project not found") @@ -86,7 +87,9 @@ listTicketsByProjectEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) handle pr User.user_id <$> Q.userByHandle authorHandle `whenNothingM` throwError (EntityMissing (ErrorID "user:missing") "User not found") pure (project, authorFilterID) _authReceipt <- AuthZ.permissionGuard $ AuthZ.checkTicketListByProject mayCallerUserId project - (nextCursor, tickets) <- PG.runTransaction $ TicketsQ.listTicketsByProjectId projectId limit cursor authorUserId statusFilter + (nextCursor, tickets) <- PG.runTransaction do + TicketsQ.listTicketsByProjectId projectId limit cursor authorUserId statusFilter + >>= UsersQ.userDisplayInfoOf (_2 . traversed . traversed) pure $ Paged {items = tickets, cursor = nextCursor} where limit = fromMaybe 20 mayLimit @@ -97,7 +100,7 @@ createTicketEndpoint :: UserHandle -> ProjectSlug -> CreateTicketRequest -> - WebApp ShareTicket + WebApp (ShareTicket UserDisplayInfo) createTicketEndpoint session userHandle projectSlug (CreateTicketRequest {title, description}) = do callerUserId <- AuthN.requireAuthenticatedUser session project@Project {projectId} <- PG.runTransactionOrRespondError $ do @@ -107,6 +110,7 @@ createTicketEndpoint session userHandle projectSlug (CreateTicketRequest {title, PG.runTransactionOrRespondError $ do (_, ticketNumber) <- TicketsQ.createTicket callerUserId projectId title description Open TicketsQ.shareTicketByProjectIdAndNumber projectId ticketNumber `whenNothingM` throwError (InternalServerError "create-ticket-error" internalServerError) + >>= UsersQ.userDisplayInfoOf traverse where projectShorthand = IDs.ProjectShortHand {userHandle, projectSlug} @@ -115,11 +119,13 @@ getTicketByNumberEndpoint :: UserHandle -> ProjectSlug -> IDs.TicketNumber -> - WebApp ShareTicket + WebApp (ShareTicket UserDisplayInfo) getTicketByNumberEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) userHandle projectSlug ticketNumber = do (project, shareTicket) <- PG.runTransactionOrRespondError $ do project@Project {projectId} <- Q.projectByShortHand projectShorthand `whenNothingM` throwError (EntityMissing (ErrorID "project:missing") "Project not found") - shareTicket <- TicketsQ.shareTicketByProjectIdAndNumber projectId ticketNumber `whenNothingM` throwError (EntityMissing (ErrorID "ticket:missing") "Ticket not found") + shareTicket <- + TicketsQ.shareTicketByProjectIdAndNumber projectId ticketNumber `whenNothingM` throwError (EntityMissing (ErrorID "ticket:missing") "Ticket not found") + >>= UsersQ.userDisplayInfoOf traversed pure (project, shareTicket) _authZReceipt <- AuthZ.permissionGuard $ AuthZ.checkTicketRead mayCallerUserId project pure shareTicket @@ -132,7 +138,7 @@ updateTicketByNumberEndpoint :: ProjectSlug -> IDs.TicketNumber -> UpdateTicketRequest -> - WebApp ShareTicket + WebApp (ShareTicket UserDisplayInfo) updateTicketByNumberEndpoint session handle projectSlug ticketNumber updateRequest@UpdateTicketRequest {title, description, status} = do callerUserId <- AuthN.requireAuthenticatedUser session (ticket@Ticket {ticketId, projectId, number = ticketNumber}) <- PG.runTransactionOrRespondError $ do @@ -143,6 +149,7 @@ updateTicketByNumberEndpoint session handle projectSlug ticketNumber updateReque PG.runTransactionOrRespondError $ do _ <- TicketsQ.updateTicket callerUserId ticketId title description status TicketsQ.shareTicketByProjectIdAndNumber projectId ticketNumber `whenNothingM` throwError (EntityMissing (ErrorID "ticket:missing") "Ticket not found") + >>= UsersQ.userDisplayInfoOf traversed where projectShorthand = IDs.ProjectShortHand {userHandle = handle, projectSlug} @@ -160,7 +167,7 @@ getTicketTimelineEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) userHandle p (nextCursor, shareTicketTimeline) <- TicketsQ.getPagedShareTicketTimelineByProjectIdAndNumber projectId ticketNumber (unCursor <$> mayCursor) limit shareTicketsTimelineWithUserInfo <- shareTicketTimeline - & userDisplayInfoOf (traverse . traverse) + & UsersQ.userDisplayInfoOf (traverse . traverse) pure (project, shareTicketsTimelineWithUserInfo, nextCursor) _authZReceipt <- AuthZ.permissionGuard $ AuthZ.checkTicketRead mayCallerUserId project pure $ Paged {items = shareTicketTimeline, cursor = Cursor <$> nextCursor} @@ -174,11 +181,13 @@ listTicketsByUserEndpoint :: Maybe (Cursor ListTicketsCursor) -> Maybe Limit -> Maybe TicketStatus -> - WebApp (Paged ListTicketsCursor ShareTicket) + WebApp (Paged ListTicketsCursor (ShareTicket UserDisplayInfo)) listTicketsByUserEndpoint (AuthN.MaybeAuthedUserID mayCallerUserId) userHandle mayCursor mayLimit statusFilter = do (tickets, nextCursor) <- PG.runTransactionOrRespondError $ do user <- Q.userByHandle userHandle `whenNothingM` throwError (EntityMissing (ErrorID "user:missing") "User not found") - (nextCursor, tickets) <- TicketsQ.listTicketsByUserId mayCallerUserId (User.user_id user) limit mayCursor statusFilter + (nextCursor, tickets) <- + TicketsQ.listTicketsByUserId mayCallerUserId (User.user_id user) limit mayCursor statusFilter + >>= UsersQ.userDisplayInfoOf (_2 . traversed . traversed) pure (tickets, nextCursor) pure $ Paged {items = tickets, cursor = nextCursor} where diff --git a/src/Share/Web/Share/Tickets/Types.hs b/src/Share/Web/Share/Tickets/Types.hs index 896bde5..e4b819c 100644 --- a/src/Share/Web/Share/Tickets/Types.hs +++ b/src/Share/Web/Share/Tickets/Types.hs @@ -14,8 +14,9 @@ import Share.Prelude import Share.Ticket (TicketStatus) import Share.Utils.API (NullableUpdate, parseNullableUpdate) import Share.Web.Share.Comments +import Share.Web.Share.Types (UserDisplayInfo) -data ShareTicket = ShareTicket +data ShareTicket user = ShareTicket { ticketId :: TicketId, projectShortHand :: ProjectShortHand, number :: TicketNumber, @@ -25,12 +26,12 @@ data ShareTicket = ShareTicket createdAt :: UTCTime, updatedAt :: UTCTime, -- This is optional so we can delete users without deleting ALL their tickets. - author :: Maybe UserHandle, + author :: Maybe user, numComments :: Int32 } - deriving (Show, Eq, Ord) + deriving stock (Show, Eq, Ord, Functor, Foldable, Traversable) -instance PG.DecodeRow ShareTicket where +instance PG.DecodeRow (ShareTicket UserId) where decodeRow = do ticketId <- PG.decodeField number <- PG.decodeField @@ -46,7 +47,7 @@ instance PG.DecodeRow ShareTicket where numComments <- PG.decodeField @Int32 pure ShareTicket {..} -instance ToJSON ShareTicket where +instance ToJSON (ShareTicket UserDisplayInfo) where toJSON ShareTicket {..} = object [ "id" .= ticketId, From 7ceac3008a980268d551dda6745419fbf4341637 Mon Sep 17 00:00:00 2001 From: Chris Penner Date: Fri, 14 Jun 2024 15:28:25 -0700 Subject: [PATCH 2/4] Re-run transcripts --- .../share-apis/tickets/ticket-create.json | 7 ++++++- .../share-apis/tickets/ticket-get.json | 7 ++++++- .../tickets/ticket-list-author-filter.json | 14 +++++++++++-- .../tickets/ticket-list-status-filter.json | 14 +++++++++++-- .../share-apis/tickets/ticket-list.json | 21 ++++++++++++++++--- .../share-apis/tickets/ticket-update.json | 7 ++++++- 6 files changed, 60 insertions(+), 10 deletions(-) diff --git a/transcripts/share-apis/tickets/ticket-create.json b/transcripts/share-apis/tickets/ticket-create.json index 7d91383..639865b 100644 --- a/transcripts/share-apis/tickets/ticket-create.json +++ b/transcripts/share-apis/tickets/ticket-create.json @@ -1,6 +1,11 @@ { "body": { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "T-", diff --git a/transcripts/share-apis/tickets/ticket-get.json b/transcripts/share-apis/tickets/ticket-get.json index 1e834e4..a1f183e 100644 --- a/transcripts/share-apis/tickets/ticket-get.json +++ b/transcripts/share-apis/tickets/ticket-get.json @@ -1,6 +1,11 @@ { "body": { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Updated description", "id": "T-", diff --git a/transcripts/share-apis/tickets/ticket-list-author-filter.json b/transcripts/share-apis/tickets/ticket-list-author-filter.json index c4bd37d..b4d1ba3 100644 --- a/transcripts/share-apis/tickets/ticket-list-author-filter.json +++ b/transcripts/share-apis/tickets/ticket-list-author-filter.json @@ -3,7 +3,12 @@ "cursor": "", "items": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "I want the code to solve all my problems but it does not. Please fix.\n\n## Things I need:\n\n* It should tie my *shoes*\n* It should make me _coffee_\n* It should do my taxes\n", "id": "T-", @@ -15,7 +20,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This ticket is closed", "id": "T-", diff --git a/transcripts/share-apis/tickets/ticket-list-status-filter.json b/transcripts/share-apis/tickets/ticket-list-status-filter.json index c90dcee..56b4419 100644 --- a/transcripts/share-apis/tickets/ticket-list-status-filter.json +++ b/transcripts/share-apis/tickets/ticket-list-status-filter.json @@ -3,7 +3,12 @@ "cursor": "", "items": [ { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "T-", @@ -15,7 +20,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "I want the code to solve all my problems but it does not. Please fix.\n\n## Things I need:\n\n* It should tie my *shoes*\n* It should make me _coffee_\n* It should do my taxes\n", "id": "T-", diff --git a/transcripts/share-apis/tickets/ticket-list.json b/transcripts/share-apis/tickets/ticket-list.json index 6bd9b88..0a28ee8 100644 --- a/transcripts/share-apis/tickets/ticket-list.json +++ b/transcripts/share-apis/tickets/ticket-list.json @@ -3,7 +3,12 @@ "cursor": "", "items": [ { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "T-", @@ -15,7 +20,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "I want the code to solve all my problems but it does not. Please fix.\n\n## Things I need:\n\n* It should tie my *shoes*\n* It should make me _coffee_\n* It should do my taxes\n", "id": "T-", @@ -27,7 +37,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This ticket is closed", "id": "T-", diff --git a/transcripts/share-apis/tickets/ticket-update.json b/transcripts/share-apis/tickets/ticket-update.json index 1e834e4..a1f183e 100644 --- a/transcripts/share-apis/tickets/ticket-update.json +++ b/transcripts/share-apis/tickets/ticket-update.json @@ -1,6 +1,11 @@ { "body": { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Updated description", "id": "T-", From 43c72d59bb55abd176dd435c24ea348d95f22fb2 Mon Sep 17 00:00:00 2001 From: Chris Penner Date: Fri, 14 Jun 2024 15:38:56 -0700 Subject: [PATCH 3/4] Re-run transcripts --- .../create-contribution-for-diff.json | 7 +++- .../contribution-create-contribution.json | 7 +++- .../contribution-create-core.json | 7 +++- .../contribution-create-draft.json | 7 +++- .../contributions/contribution-get.json | 7 +++- .../contribution-list-author-filter.json | 28 ++++++++++++--- .../contribution-list-kind-filter.json | 7 +++- .../contribution-list-status-filter.json | 21 +++++++++-- .../contributions/contribution-list.json | 35 ++++++++++++++++--- .../contributions/contribution-update.json | 7 +++- .../create-feature-one-contribution.json | 7 +++- .../create-feature-two-contribution.json | 7 +++- .../contributions/merged-contribution.json | 7 +++- .../transitive-contribution.json | 7 +++- .../maintain-maintainer-ticket-close.json | 7 +++- .../owner-ticket-create.json | 7 +++- .../read-maintainer-ticket-create.json | 7 +++- 17 files changed, 156 insertions(+), 26 deletions(-) diff --git a/transcripts/share-apis/contribution-diffs/create-contribution-for-diff.json b/transcripts/share-apis/contribution-diffs/create-contribution-for-diff.json index edff817..23bdd1f 100644 --- a/transcripts/share-apis/contribution-diffs/create-contribution-for-diff.json +++ b/transcripts/share-apis/contribution-diffs/create-contribution-for-diff.json @@ -1,6 +1,11 @@ { "body": { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", diff --git a/transcripts/share-apis/contributions/contribution-create-contribution.json b/transcripts/share-apis/contributions/contribution-create-contribution.json index e5ac93a..e91fe2c 100644 --- a/transcripts/share-apis/contributions/contribution-create-contribution.json +++ b/transcripts/share-apis/contributions/contribution-create-contribution.json @@ -1,6 +1,11 @@ { "body": { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", diff --git a/transcripts/share-apis/contributions/contribution-create-core.json b/transcripts/share-apis/contributions/contribution-create-core.json index 65ff466..4993994 100644 --- a/transcripts/share-apis/contributions/contribution-create-core.json +++ b/transcripts/share-apis/contributions/contribution-create-core.json @@ -1,6 +1,11 @@ { "body": { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", diff --git a/transcripts/share-apis/contributions/contribution-create-draft.json b/transcripts/share-apis/contributions/contribution-create-draft.json index 09c8a2b..b5606cf 100644 --- a/transcripts/share-apis/contributions/contribution-create-draft.json +++ b/transcripts/share-apis/contributions/contribution-create-draft.json @@ -1,6 +1,11 @@ { "body": { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", diff --git a/transcripts/share-apis/contributions/contribution-get.json b/transcripts/share-apis/contributions/contribution-get.json index 6ea351d..926c40e 100644 --- a/transcripts/share-apis/contributions/contribution-get.json +++ b/transcripts/share-apis/contributions/contribution-get.json @@ -1,6 +1,11 @@ { "body": { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "Updated description", "id": "C-", diff --git a/transcripts/share-apis/contributions/contribution-list-author-filter.json b/transcripts/share-apis/contributions/contribution-list-author-filter.json index 510dfd3..2a3e5ff 100644 --- a/transcripts/share-apis/contributions/contribution-list-author-filter.json +++ b/transcripts/share-apis/contributions/contribution-list-author-filter.json @@ -3,7 +3,12 @@ "cursor": "", "items": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", @@ -17,7 +22,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", @@ -31,7 +41,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -45,7 +60,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/contributions/contribution-list-kind-filter.json b/transcripts/share-apis/contributions/contribution-list-kind-filter.json index 99c0bfa..5449884 100644 --- a/transcripts/share-apis/contributions/contribution-list-kind-filter.json +++ b/transcripts/share-apis/contributions/contribution-list-kind-filter.json @@ -3,7 +3,12 @@ "cursor": "", "items": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", diff --git a/transcripts/share-apis/contributions/contribution-list-status-filter.json b/transcripts/share-apis/contributions/contribution-list-status-filter.json index 1a1ab9f..e6f34bd 100644 --- a/transcripts/share-apis/contributions/contribution-list-status-filter.json +++ b/transcripts/share-apis/contributions/contribution-list-status-filter.json @@ -3,7 +3,12 @@ "cursor": "", "items": [ { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", @@ -17,7 +22,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -31,7 +41,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/contributions/contribution-list.json b/transcripts/share-apis/contributions/contribution-list.json index 4b8c08a..045b960 100644 --- a/transcripts/share-apis/contributions/contribution-list.json +++ b/transcripts/share-apis/contributions/contribution-list.json @@ -3,7 +3,12 @@ "cursor": "", "items": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", @@ -17,7 +22,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", @@ -31,7 +41,12 @@ "updatedAt": "" }, { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "C-", @@ -45,7 +60,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -59,7 +79,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/contributions/contribution-update.json b/transcripts/share-apis/contributions/contribution-update.json index 6ea351d..926c40e 100644 --- a/transcripts/share-apis/contributions/contribution-update.json +++ b/transcripts/share-apis/contributions/contribution-update.json @@ -1,6 +1,11 @@ { "body": { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "Updated description", "id": "C-", diff --git a/transcripts/share-apis/contributions/create-feature-one-contribution.json b/transcripts/share-apis/contributions/create-feature-one-contribution.json index bd0af76..572e470 100644 --- a/transcripts/share-apis/contributions/create-feature-one-contribution.json +++ b/transcripts/share-apis/contributions/create-feature-one-contribution.json @@ -1,6 +1,11 @@ { "body": { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "description", "id": "C-", diff --git a/transcripts/share-apis/contributions/create-feature-two-contribution.json b/transcripts/share-apis/contributions/create-feature-two-contribution.json index fbc4429..6f1abc2 100644 --- a/transcripts/share-apis/contributions/create-feature-two-contribution.json +++ b/transcripts/share-apis/contributions/create-feature-two-contribution.json @@ -1,6 +1,11 @@ { "body": { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "description", "id": "C-", diff --git a/transcripts/share-apis/contributions/merged-contribution.json b/transcripts/share-apis/contributions/merged-contribution.json index b29fd5a..4eeb62a 100644 --- a/transcripts/share-apis/contributions/merged-contribution.json +++ b/transcripts/share-apis/contributions/merged-contribution.json @@ -1,6 +1,11 @@ { "body": { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "description", "id": "C-", diff --git a/transcripts/share-apis/contributions/transitive-contribution.json b/transcripts/share-apis/contributions/transitive-contribution.json index b804d8b..4c8eeaa 100644 --- a/transcripts/share-apis/contributions/transitive-contribution.json +++ b/transcripts/share-apis/contributions/transitive-contribution.json @@ -1,6 +1,11 @@ { "body": { - "author": "transcripts", + "author": { + "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", + "handle": "transcripts", + "name": "Transcript User", + "userId": "U-" + }, "createdAt": "", "description": "description", "id": "C-", diff --git a/transcripts/share-apis/project-maintainers/maintain-maintainer-ticket-close.json b/transcripts/share-apis/project-maintainers/maintain-maintainer-ticket-close.json index d14e836..5090254 100644 --- a/transcripts/share-apis/project-maintainers/maintain-maintainer-ticket-close.json +++ b/transcripts/share-apis/project-maintainers/maintain-maintainer-ticket-close.json @@ -1,6 +1,11 @@ { "body": { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "T-", diff --git a/transcripts/share-apis/project-maintainers/owner-ticket-create.json b/transcripts/share-apis/project-maintainers/owner-ticket-create.json index d5a15dd..1cf5015 100644 --- a/transcripts/share-apis/project-maintainers/owner-ticket-create.json +++ b/transcripts/share-apis/project-maintainers/owner-ticket-create.json @@ -1,6 +1,11 @@ { "body": { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "T-", diff --git a/transcripts/share-apis/project-maintainers/read-maintainer-ticket-create.json b/transcripts/share-apis/project-maintainers/read-maintainer-ticket-create.json index a55c781..dfa6e95 100644 --- a/transcripts/share-apis/project-maintainers/read-maintainer-ticket-create.json +++ b/transcripts/share-apis/project-maintainers/read-maintainer-ticket-create.json @@ -1,6 +1,11 @@ { "body": { - "author": "read-maintainer", + "author": { + "avatarUrl": null, + "handle": "read-maintainer", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "My description", "id": "T-", From af26824b96aa25e0fa135c5685c0c141f28e9284 Mon Sep 17 00:00:00 2001 From: Chris Penner Date: Mon, 17 Jun 2024 16:24:55 -0600 Subject: [PATCH 4/4] Rerun transcripts again --- .../branches/branch-list-by-self-name-prefix.json | 14 ++++++++++++-- .../branches/branch-list-by-self-project-ref.json | 14 ++++++++++++-- .../branches/branch-list-by-user-self.json | 14 ++++++++++++-- .../branches/branch-list-contributor-filter.json | 14 ++++++++++++-- .../branches/branch-list-contributor-prefix.json | 14 ++++++++++++-- .../branches/branch-list-contributors-only.json | 14 ++++++++++++-- .../branches/branch-list-name-prefix.json | 14 ++++++++++++-- .../share-apis/branches/branch-list-private.json | 14 ++++++++++++-- transcripts/share-apis/branches/branch-list.json | 14 ++++++++++++-- 9 files changed, 108 insertions(+), 18 deletions(-) diff --git a/transcripts/share-apis/branches/branch-list-by-self-name-prefix.json b/transcripts/share-apis/branches/branch-list-by-self-name-prefix.json index 234355d..8bbe4a4 100644 --- a/transcripts/share-apis/branches/branch-list-by-self-name-prefix.json +++ b/transcripts/share-apis/branches/branch-list-by-self-name-prefix.json @@ -7,7 +7,12 @@ "causalHash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg", "contributions": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -21,7 +26,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/branches/branch-list-by-self-project-ref.json b/transcripts/share-apis/branches/branch-list-by-self-project-ref.json index 234355d..8bbe4a4 100644 --- a/transcripts/share-apis/branches/branch-list-by-self-project-ref.json +++ b/transcripts/share-apis/branches/branch-list-by-self-project-ref.json @@ -7,7 +7,12 @@ "causalHash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg", "contributions": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -21,7 +26,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/branches/branch-list-by-user-self.json b/transcripts/share-apis/branches/branch-list-by-user-self.json index d7fe130..c83a1f5 100644 --- a/transcripts/share-apis/branches/branch-list-by-user-self.json +++ b/transcripts/share-apis/branches/branch-list-by-user-self.json @@ -7,7 +7,12 @@ "causalHash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg", "contributions": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -21,7 +26,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/branches/branch-list-contributor-filter.json b/transcripts/share-apis/branches/branch-list-contributor-filter.json index 470e348..eb2b51f 100644 --- a/transcripts/share-apis/branches/branch-list-contributor-filter.json +++ b/transcripts/share-apis/branches/branch-list-contributor-filter.json @@ -7,7 +7,12 @@ "causalHash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg", "contributions": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -21,7 +26,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/branches/branch-list-contributor-prefix.json b/transcripts/share-apis/branches/branch-list-contributor-prefix.json index 470e348..eb2b51f 100644 --- a/transcripts/share-apis/branches/branch-list-contributor-prefix.json +++ b/transcripts/share-apis/branches/branch-list-contributor-prefix.json @@ -7,7 +7,12 @@ "causalHash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg", "contributions": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -21,7 +26,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/branches/branch-list-contributors-only.json b/transcripts/share-apis/branches/branch-list-contributors-only.json index 234355d..8bbe4a4 100644 --- a/transcripts/share-apis/branches/branch-list-contributors-only.json +++ b/transcripts/share-apis/branches/branch-list-contributors-only.json @@ -7,7 +7,12 @@ "causalHash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg", "contributions": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -21,7 +26,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/branches/branch-list-name-prefix.json b/transcripts/share-apis/branches/branch-list-name-prefix.json index 234355d..8bbe4a4 100644 --- a/transcripts/share-apis/branches/branch-list-name-prefix.json +++ b/transcripts/share-apis/branches/branch-list-name-prefix.json @@ -7,7 +7,12 @@ "causalHash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg", "contributions": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -21,7 +26,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/branches/branch-list-private.json b/transcripts/share-apis/branches/branch-list-private.json index d7fe130..c83a1f5 100644 --- a/transcripts/share-apis/branches/branch-list-private.json +++ b/transcripts/share-apis/branches/branch-list-private.json @@ -7,7 +7,12 @@ "causalHash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg", "contributions": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -21,7 +26,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-", diff --git a/transcripts/share-apis/branches/branch-list.json b/transcripts/share-apis/branches/branch-list.json index 470e348..eb2b51f 100644 --- a/transcripts/share-apis/branches/branch-list.json +++ b/transcripts/share-apis/branches/branch-list.json @@ -7,7 +7,12 @@ "causalHash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg", "contributions": [ { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "Adds pagination functionality to the user list page in the admin panel to improve performance and user experience.\n## Changes Made:\n\n* Implemented pagination using the Paginator type.\n* Updated the user list view to display a paginated list.\n* Added a new route for paginated user list.\n\n## Testing:\n\nI tested the pagination feature with a large dataset to ensure it functions correctly. I also tested edge cases and confirmed that the user list is now paginated as expected.\n", "id": "C-", @@ -21,7 +26,12 @@ "updatedAt": "" }, { - "author": "test", + "author": { + "avatarUrl": null, + "handle": "test", + "name": null, + "userId": "U-" + }, "createdAt": "", "description": "This contribution addresses an issue where users were unable to log in due to a validation error in the authentication process.\n\n## Changes made:\n\n* Modified the validation logic for the Auth type to properly authenticate users.\n* Added unit tests to ensure the authentication process works as expected.\n\n## Testing:\n\nI tested this change locally on my development environment and confirmed that users can now log in without any issues. All unit tests are passing.", "id": "C-",