do not let user merge again once merged
+ 10
- 1
app/views/repositoryPullRequests/RepositoryPullRequestDetailsView.tsx
@@ -3,7 +3,12 @@ import type { ReactView } from "@ethicdevs/react-monolith";
 // 3rd-party
 import React from "react";
 // generated via script[generate:prisma]
-import type { Organization, PullRequest, User } from "@prisma/client";
+import {
+  PullRequestState,
+  type Organization,
+  type PullRequest,
+  type User,
+} from "@prisma/client";
 // app
 import type {
   CommonProps,

...
@@ -66,6 +71,10 @@ const RepositoryPullRequestDetailsView: ReactView<
     { additions: 0, deletions: 0 }
   );
 
+  if (pr.state !== PullRequestState.OPEN) {
+    isCurrentUserAllowedToMerge = false;
+  }
+
   return (
     <Layout {...commonProps}>
       <PageWrapper>