stable

Clone or download

Read-only

Have REST api types in a shared lib

part of story #31091 Add the hybrid comment to manage comments Given the fact that we now have 2 apps and 1 component working with the REST api types of the pullrequest plugin routes, it would be great to stop duplicating the types definitions everywhere. Moreover, several types used in both app are defined in lib/pullrequest-comments. It is not really the place to do it, so let's move those definitions in dedicated libraries. -- No changes expected -- Change-Id: I300d97e92efe3555d8e252182ad643b74022a08a

Modified Files

Name
M lib/frontend/rest-api-types/src/main.ts +6 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/constants/.gitignore +1 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/constants/package.json +26 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/constants/pnpm-lock.yaml +7 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/constants/src/constants.ts +52 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/constants/tsconfig.json +7 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/constants/vite.config.ts +31 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/package.json +2 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/pnpm-lock.yaml +4 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestComment.test.ts +5 −5 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestComment.ts +11 −10 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentBodyTemplate.test.ts +1 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentBodyTemplate.ts +10 −9 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentController.test.ts +11 −8 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentController.ts +16 −14 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentFooterTemplate.ts +12 −9 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentPresenter.test.ts +5 −5 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentPresenter.ts +7 −19 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentRepliesStore.test.ts +1 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentRepliesStore.ts +1 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentReplyFormFocusHelper.ts +3 −3 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentReplyFormTemplate.ts +7 −7 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentReplySaver.ts +12 −17 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentReplyTemplate.ts +5 −5 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/main.ts +2 −7 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/types.ts +12 −9 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/tests/stubs/PullRequestCommentPresenterStub.ts +4 −5 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/tests/stubs/SaveNewCommentStub.ts +4 −6 Go to diff View file
A plugins/pullrequest/scripts/lib/rest-api-types/.gitignore +1 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/rest-api-types/package.json +25 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/rest-api-types/pnpm-lock.yaml +9 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/rest-api-types/src/main.ts +26 −0 Go to diff View file
R plugins/pullrequest/scripts/pullrequest-overview/src/api/types.ts Go to diff View file
A plugins/pullrequest/scripts/lib/rest-api-types/src/timeline.ts +77 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/rest-api-types/tsconfig-build.json +9 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/rest-api-types/tsconfig.json +7 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/package.json +2 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/pnpm-lock.yaml +4 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/api/tuleap-rest-querier.ts +4 −6 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/OverviewAppHeader.test.ts +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/OverviewAppHeader.vue +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/OverviewPane.test.ts +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/OverviewPane.vue +4 −3 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestAuthor.test.ts +3 −3 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestAuthor.vue +3 −3 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestCIStatus.test.ts +5 −5 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestCIStatus.vue +3 −3 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestCreationDate.vue +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestReferences.test.ts +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestReferences.vue +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestStats.test.ts +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestStats.vue +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/package.json +2 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/pnpm-lock.yaml +4 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/comments/PullRequestCommentPresenterBuilder.test.ts +46 −38 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/comments/PullRequestCommentPresenterBuilder.ts +79 −78 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/comments/new-comment-form/NewInlineCommentContext.ts +1 −1 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/comments/new-comment-form/NewInlineCommentForm.test.ts +8 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/comments/new-comment-form/NewInlineCommentForm.ts +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/comments/new-comment-form/NewInlineCommentSaver.test.ts +1 −1 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/comments/new-comment-form/NewInlineCommentSaver.ts +4 −4 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/comments/types.ts +3 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/scroll-to-comment/FileDiffCommentScroller.test.ts +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/scroll-to-comment/FileDiffCommentScroller.ts +1 −1 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/widgets/SideBySideCodeMirrorWidgetsCreationManager.test.ts +3 −5 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/widgets/SideBySideCodeMirrorWidgetsCreationManager.ts +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/tests/stubs/PullRequestCommentPresenterStub.ts +3 −3 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/tests/stubs/SaveNewInlineCommentStub.ts +4 −4 Go to diff View file