feat: add post-run Gitea lifecycle (#5)

This commit is contained in:
-Puter
2026-07-24 02:05:30 +05:30
parent 7974bd5f3e
commit a17d53cb41
16 changed files with 1281 additions and 7 deletions
@@ -33,6 +33,30 @@ export const useProjectWorkspace = () => {
api.projectIssues.list,
activeProjectId ? { projectId: activeProjectId } : "skip"
);
const events = useQuery(
api.projectIssues.events,
activeProjectId ? { projectId: activeProjectId } : "skip"
);
const pullRequest = events
?.map((event) => event.data)
.find(
(
data
): data is {
pullRequest: {
baseBranch: string;
branch: string;
number: number;
status: "open" | "closed" | "merged";
url: string;
};
} =>
typeof data === "object" &&
data !== null &&
"pullRequest" in data &&
typeof data.pullRequest === "object" &&
data.pullRequest !== null
)?.pullRequest;
const connectRepository = async () => {
setPendingAction("connect");
@@ -99,11 +123,13 @@ export const useProjectWorkspace = () => {
artifacts,
connectRepository,
error,
events,
issueBody,
issueTitle,
issues,
pendingAction,
projects,
pullRequest,
raiseIssue,
repository,
selectedProject,