@happyvertical/smrt-projects 0.37.2 → 0.37.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,255 @@
1
+ import { i as __exportAll, t as Issue } from "./Issue-DITLxBl7.js";
2
+ import "./constants-BhVfX4Jn.js";
3
+ import { smrt } from "@happyvertical/smrt-core";
4
+ import { TenantScoped } from "@happyvertical/smrt-tenancy";
5
+ //#region src/models/PullRequest.ts
6
+ var PullRequest_exports = /* @__PURE__ */ __exportAll({ PullRequest: () => PullRequest });
7
+ var __defProp = Object.defineProperty;
8
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
+ var __decorateClass = (decorators, target, key, kind) => {
10
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
11
+ for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12
+ if (kind && result) __defProp(target, key, result);
13
+ return result;
14
+ };
15
+ var PullRequest = class extends Issue {
16
+ /**
17
+ * Source branch ref
18
+ */
19
+ headRef = "";
20
+ /**
21
+ * Target branch ref
22
+ */
23
+ baseRef = "";
24
+ /**
25
+ * Whether the PR has been merged
26
+ */
27
+ merged = false;
28
+ /**
29
+ * When the PR was merged
30
+ */
31
+ mergedAt = null;
32
+ /**
33
+ * Whether the PR can be merged
34
+ */
35
+ mergeable = true;
36
+ /**
37
+ * Whether this is a draft PR
38
+ */
39
+ draft = false;
40
+ /**
41
+ * Lines added
42
+ */
43
+ additions = 0;
44
+ /**
45
+ * Lines deleted
46
+ */
47
+ deletions = 0;
48
+ /**
49
+ * Number of files changed
50
+ */
51
+ changedFiles = 0;
52
+ constructor(options = {}) {
53
+ super(options);
54
+ if (options.headRef !== void 0) this.headRef = options.headRef;
55
+ if (options.baseRef !== void 0) this.baseRef = options.baseRef;
56
+ if (options.merged !== void 0) this.merged = options.merged;
57
+ if (options.mergedAt !== void 0) this.mergedAt = options.mergedAt;
58
+ if (options.mergeable !== void 0) this.mergeable = options.mergeable;
59
+ if (options.draft !== void 0) this.draft = options.draft;
60
+ if (options.additions !== void 0) this.additions = options.additions;
61
+ if (options.deletions !== void 0) this.deletions = options.deletions;
62
+ if (options.changedFiles !== void 0) this.changedFiles = options.changedFiles;
63
+ }
64
+ /**
65
+ * Sync PR data from the provider
66
+ *
67
+ * @param options - Sync options
68
+ * @returns This PR with updated fields
69
+ */
70
+ async sync(options = {}) {
71
+ if (!options.force && this.lastSyncedAt && Date.now() - this.lastSyncedAt.getTime() < 3e5) return this;
72
+ const prData = await (await this.getClient()).getPullRequest(this.number);
73
+ this.nodeId = prData.id;
74
+ this.title = prData.title;
75
+ this.body = prData.body;
76
+ this.state = prData.state;
77
+ this.author = prData.author.login;
78
+ this.labels = prData.labels.map((l) => l.name);
79
+ this.assignees = prData.assignees.map((a) => a.login);
80
+ this.commentsCount = prData.commentsCount;
81
+ this.headRef = prData.headRef;
82
+ this.baseRef = prData.baseRef;
83
+ this.merged = prData.merged;
84
+ this.mergedAt = prData.mergedAt || null;
85
+ this.mergeable = prData.mergeable;
86
+ this.draft = prData.draft;
87
+ this.lastSyncedAt = /* @__PURE__ */ new Date();
88
+ await this.save();
89
+ return this;
90
+ }
91
+ /**
92
+ * AI-powered: Generate a summary of PR changes
93
+ *
94
+ * @returns Summary of what this PR does
95
+ */
96
+ async summarize() {
97
+ return await this.do(`Summarize this pull request concisely.
98
+
99
+ Title: ${this.title}
100
+ Description: ${this.body}
101
+
102
+ Changes: ${this.additions} additions, ${this.deletions} deletions across ${this.changedFiles} files
103
+ Source: ${this.headRef} \u2192 ${this.baseRef}
104
+
105
+ Provide a 2-3 sentence summary focusing on:
106
+ 1. What the PR does
107
+ 2. Why it matters
108
+ 3. Any notable implementation details`, { includeData: false });
109
+ }
110
+ /**
111
+ * Merge this pull request
112
+ *
113
+ * @param method - Merge method (merge, squash, rebase)
114
+ */
115
+ async merge(method = "squash") {
116
+ if (this.merged) throw new Error("Pull request is already merged");
117
+ if (this.draft) throw new Error("Cannot merge a draft pull request");
118
+ if (!this.mergeable) throw new Error("Pull request is not mergeable");
119
+ await (await this.getClient()).mergePullRequest(this.number, method);
120
+ this.merged = true;
121
+ this.mergedAt = /* @__PURE__ */ new Date();
122
+ this.state = "closed";
123
+ this.lastSyncedAt = /* @__PURE__ */ new Date();
124
+ await this.save();
125
+ }
126
+ /**
127
+ * Mark this draft PR as ready for review
128
+ */
129
+ async markReady() {
130
+ if (!this.draft) throw new Error("Pull request is not a draft");
131
+ await (await this.getClient()).markPRReady(this.number);
132
+ this.draft = false;
133
+ this.lastSyncedAt = /* @__PURE__ */ new Date();
134
+ await this.save();
135
+ }
136
+ /**
137
+ * Convert this PR back to draft
138
+ */
139
+ async convertToDraft() {
140
+ if (this.draft) throw new Error("Pull request is already a draft");
141
+ await (await this.getClient()).convertPRToDraft(this.number);
142
+ this.draft = true;
143
+ this.lastSyncedAt = /* @__PURE__ */ new Date();
144
+ await this.save();
145
+ }
146
+ /**
147
+ * Request review from specified users
148
+ *
149
+ * @param reviewers - User logins to request review from
150
+ */
151
+ async requestReviewers(reviewers) {
152
+ await (await this.getClient()).requestReview(this.number, reviewers);
153
+ }
154
+ /**
155
+ * Find related issue for this PR
156
+ *
157
+ * @returns Related Issue or null
158
+ */
159
+ async findLinkedIssue() {
160
+ const issue = await (await this.getClient()).findIssueForPR(this.number);
161
+ if (!issue) return null;
162
+ const { IssueCollection } = await import("../index.js").then((n) => n.r);
163
+ return await (await IssueCollection.create(this.options)).findOne({ where: {
164
+ repositoryId: this.repositoryId,
165
+ number: issue.number
166
+ } });
167
+ }
168
+ /**
169
+ * AI-powered: Check if this PR is ready to merge
170
+ *
171
+ * @returns True if the PR appears ready
172
+ */
173
+ async isReadyToMerge() {
174
+ if (this.draft) return false;
175
+ if (!this.mergeable) return false;
176
+ if (this.state === "closed") return false;
177
+ return await this.is(`This pull request is ready to merge because:
178
+ - It has a clear description of what it does
179
+ - It addresses a specific issue or feature
180
+ - The scope is appropriate (not too large)
181
+ - There are no unresolved review comments`);
182
+ }
183
+ /**
184
+ * AI-powered: Suggest reviewers based on changed files
185
+ *
186
+ * @returns Array of suggested reviewer logins
187
+ */
188
+ async suggestReviewers() {
189
+ return (await this.do(`Based on this pull request's title, description, and scope,
190
+ suggest who should review it.
191
+
192
+ Title: ${this.title}
193
+ Description: ${this.body}
194
+ Changes: ${this.changedFiles} files changed
195
+
196
+ Consider:
197
+ - Code owners for the affected areas
198
+ - Team members with relevant expertise
199
+ - People who have previously worked on related code
200
+
201
+ Return only a comma-separated list of GitHub usernames, nothing else.
202
+ If you cannot determine reviewers, return an empty string.`, { includeData: false })).split(",").map((r) => r.trim()).filter(Boolean);
203
+ }
204
+ /**
205
+ * Get PR URL
206
+ */
207
+ getUrl() {
208
+ const repo = this._repository;
209
+ if (repo) return `https://github.com/${repo.owner}/${repo.name}/pull/${this.number}`;
210
+ return "";
211
+ }
212
+ /**
213
+ * Get the change size classification
214
+ *
215
+ * @returns Size classification (xs, s, m, l, xl)
216
+ */
217
+ getChangeSize() {
218
+ const total = this.additions + this.deletions;
219
+ if (total < 10) return "xs";
220
+ if (total < 50) return "s";
221
+ if (total < 200) return "m";
222
+ if (total < 500) return "l";
223
+ return "xl";
224
+ }
225
+ };
226
+ PullRequest = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
227
+ api: { include: [
228
+ "list",
229
+ "get",
230
+ "create",
231
+ "update"
232
+ ] },
233
+ mcp: { include: [
234
+ "list",
235
+ "get",
236
+ "sync",
237
+ "summarize",
238
+ "merge"
239
+ ] },
240
+ cli: {
241
+ include: [
242
+ "list",
243
+ "get",
244
+ "sync",
245
+ "summarize",
246
+ "merge",
247
+ "markReady"
248
+ ],
249
+ skipApiCheck: true
250
+ }
251
+ })], PullRequest);
252
+ //#endregion
253
+ export { PullRequest_exports as n, PullRequest as t };
254
+
255
+ //# sourceMappingURL=PullRequest-C6mck19s.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PullRequest-C6mck19s.js","names":[],"sources":["../../src/models/PullRequest.ts"],"sourcesContent":["/**\n * PullRequest model - SMRT wrapper for pull request operations\n *\n * Extends Issue with PR-specific fields and methods.\n * Uses @happyvertical/repos SDK for actual API calls.\n */\n\nimport { smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped } from '@happyvertical/smrt-tenancy';\nimport { SYNC_THROTTLE_MS } from '../constants';\nimport type { MergeMethod, SyncOptions } from '../types';\nimport { Issue, type IssueOptions } from './Issue';\n\nexport interface PullRequestOptions extends IssueOptions {\n headRef?: string;\n baseRef?: string;\n merged?: boolean;\n mergedAt?: Date | null;\n mergeable?: boolean;\n draft?: boolean;\n additions?: number;\n deletions?: number;\n changedFiles?: number;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n api: { include: ['list', 'get', 'create', 'update'] },\n mcp: { include: ['list', 'get', 'sync', 'summarize', 'merge'] },\n // sync/summarize/merge/markReady are operator commands invoked in-process\n // via the CLI; they intentionally aren't exposed over HTTP today.\n cli: {\n include: ['list', 'get', 'sync', 'summarize', 'merge', 'markReady'],\n skipApiCheck: true,\n },\n})\nexport class PullRequest extends Issue {\n /**\n * Source branch ref\n */\n headRef: string = '';\n\n /**\n * Target branch ref\n */\n baseRef: string = '';\n\n /**\n * Whether the PR has been merged\n */\n merged: boolean = false;\n\n /**\n * When the PR was merged\n */\n mergedAt: Date | null = null;\n\n /**\n * Whether the PR can be merged\n */\n mergeable: boolean = true;\n\n /**\n * Whether this is a draft PR\n */\n draft: boolean = false;\n\n /**\n * Lines added\n */\n additions: number = 0;\n\n /**\n * Lines deleted\n */\n deletions: number = 0;\n\n /**\n * Number of files changed\n */\n changedFiles: number = 0;\n\n constructor(options: PullRequestOptions = {}) {\n super(options);\n if (options.headRef !== undefined) this.headRef = options.headRef;\n if (options.baseRef !== undefined) this.baseRef = options.baseRef;\n if (options.merged !== undefined) this.merged = options.merged;\n if (options.mergedAt !== undefined) this.mergedAt = options.mergedAt;\n if (options.mergeable !== undefined) this.mergeable = options.mergeable;\n if (options.draft !== undefined) this.draft = options.draft;\n if (options.additions !== undefined) this.additions = options.additions;\n if (options.deletions !== undefined) this.deletions = options.deletions;\n if (options.changedFiles !== undefined)\n this.changedFiles = options.changedFiles;\n }\n\n /**\n * Sync PR data from the provider\n *\n * @param options - Sync options\n * @returns This PR with updated fields\n */\n async sync(options: SyncOptions = {}): Promise<this> {\n // Check if we recently synced (within 5 minutes)\n if (\n !options.force &&\n this.lastSyncedAt &&\n Date.now() - this.lastSyncedAt.getTime() < SYNC_THROTTLE_MS\n ) {\n return this;\n }\n\n const client = await this.getClient();\n const prData = await client.getPullRequest(this.number);\n\n // Update base issue fields\n this.nodeId = prData.id;\n this.title = prData.title;\n this.body = prData.body;\n this.state = prData.state;\n this.author = prData.author.login;\n this.labels = prData.labels.map((l) => l.name);\n this.assignees = prData.assignees.map((a) => a.login);\n this.commentsCount = prData.commentsCount;\n\n // Update PR-specific fields\n this.headRef = prData.headRef;\n this.baseRef = prData.baseRef;\n this.merged = prData.merged;\n this.mergedAt = prData.mergedAt || null;\n this.mergeable = prData.mergeable;\n this.draft = prData.draft;\n\n this.lastSyncedAt = new Date();\n await this.save();\n return this;\n }\n\n /**\n * AI-powered: Generate a summary of PR changes\n *\n * @returns Summary of what this PR does\n */\n async summarize(): Promise<string> {\n return await this.do(\n `Summarize this pull request concisely.\n\n Title: ${this.title}\n Description: ${this.body}\n\n Changes: ${this.additions} additions, ${this.deletions} deletions across ${this.changedFiles} files\n Source: ${this.headRef} → ${this.baseRef}\n\n Provide a 2-3 sentence summary focusing on:\n 1. What the PR does\n 2. Why it matters\n 3. Any notable implementation details`,\n // Title/body/stats hand-rolled above; skip do()'s object-data injection.\n { includeData: false },\n );\n }\n\n /**\n * Merge this pull request\n *\n * @param method - Merge method (merge, squash, rebase)\n */\n async merge(method: MergeMethod = 'squash'): Promise<void> {\n if (this.merged) {\n throw new Error('Pull request is already merged');\n }\n\n if (this.draft) {\n throw new Error('Cannot merge a draft pull request');\n }\n\n if (!this.mergeable) {\n throw new Error('Pull request is not mergeable');\n }\n\n const client = await this.getClient();\n await client.mergePullRequest(this.number, method);\n\n this.merged = true;\n this.mergedAt = new Date();\n this.state = 'closed';\n this.lastSyncedAt = new Date();\n await this.save();\n }\n\n /**\n * Mark this draft PR as ready for review\n */\n async markReady(): Promise<void> {\n if (!this.draft) {\n throw new Error('Pull request is not a draft');\n }\n\n const client = await this.getClient();\n await client.markPRReady(this.number);\n\n this.draft = false;\n this.lastSyncedAt = new Date();\n await this.save();\n }\n\n /**\n * Convert this PR back to draft\n */\n async convertToDraft(): Promise<void> {\n if (this.draft) {\n throw new Error('Pull request is already a draft');\n }\n\n const client = await this.getClient();\n await client.convertPRToDraft(this.number);\n\n this.draft = true;\n this.lastSyncedAt = new Date();\n await this.save();\n }\n\n /**\n * Request review from specified users\n *\n * @param reviewers - User logins to request review from\n */\n async requestReviewers(reviewers: string[]): Promise<void> {\n const client = await this.getClient();\n await client.requestReview(this.number, reviewers);\n }\n\n /**\n * Find related issue for this PR\n *\n * @returns Related Issue or null\n */\n async findLinkedIssue(): Promise<Issue | null> {\n const client = await this.getClient();\n const issue = await client.findIssueForPR(this.number);\n\n if (!issue) {\n return null;\n }\n\n // Return as SMRT Issue\n const { IssueCollection } = await import('../collections/Issues');\n const collection = await IssueCollection.create(this.options);\n return await collection.findOne({\n where: { repositoryId: this.repositoryId, number: issue.number },\n });\n }\n\n /**\n * AI-powered: Check if this PR is ready to merge\n *\n * @returns True if the PR appears ready\n */\n async isReadyToMerge(): Promise<boolean> {\n if (this.draft) return false;\n if (!this.mergeable) return false;\n if (this.state === 'closed') return false;\n\n return await this.is(\n `This pull request is ready to merge because:\n - It has a clear description of what it does\n - It addresses a specific issue or feature\n - The scope is appropriate (not too large)\n - There are no unresolved review comments`,\n );\n }\n\n /**\n * AI-powered: Suggest reviewers based on changed files\n *\n * @returns Array of suggested reviewer logins\n */\n async suggestReviewers(): Promise<string[]> {\n const suggestion = await this.do(\n `Based on this pull request's title, description, and scope,\n suggest who should review it.\n\n Title: ${this.title}\n Description: ${this.body}\n Changes: ${this.changedFiles} files changed\n\n Consider:\n - Code owners for the affected areas\n - Team members with relevant expertise\n - People who have previously worked on related code\n\n Return only a comma-separated list of GitHub usernames, nothing else.\n If you cannot determine reviewers, return an empty string.`,\n // Title/description hand-rolled above; skip do()'s object-data injection.\n { includeData: false },\n );\n\n return suggestion\n .split(',')\n .map((r) => r.trim())\n .filter(Boolean);\n }\n\n /**\n * Get PR URL\n */\n override getUrl(): string {\n const repo = this._repository;\n if (repo) {\n return `https://github.com/${repo.owner}/${repo.name}/pull/${this.number}`;\n }\n return '';\n }\n\n /**\n * Get the change size classification\n *\n * @returns Size classification (xs, s, m, l, xl)\n */\n getChangeSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n const total = this.additions + this.deletions;\n\n if (total < 10) return 'xs';\n if (total < 50) return 's';\n if (total < 200) return 'm';\n if (total < 500) return 'l';\n return 'xl';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAoCO,IAAM,cAAN,cAA0B,MAAM;;;;CAIrC,UAAkB;;;;CAKlB,UAAkB;;;;CAKlB,SAAkB;;;;CAKlB,WAAwB;;;;CAKxB,YAAqB;;;;CAKrB,QAAiB;;;;CAKjB,YAAoB;;;;CAKpB,YAAoB;;;;CAKpB,eAAuB;CAEvB,YAAY,UAA8B,CAAC,GAAG;EAC5C,MAAM,OAAO;EACb,IAAI,QAAQ,YAAY,KAAA,GAAW,KAAK,UAAU,QAAQ;EAC1D,IAAI,QAAQ,YAAY,KAAA,GAAW,KAAK,UAAU,QAAQ;EAC1D,IAAI,QAAQ,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;EACxD,IAAI,QAAQ,aAAa,KAAA,GAAW,KAAK,WAAW,QAAQ;EAC5D,IAAI,QAAQ,cAAc,KAAA,GAAW,KAAK,YAAY,QAAQ;EAC9D,IAAI,QAAQ,UAAU,KAAA,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
+ {"version":3,"file":"constants-BhVfX4Jn.js","names":[],"sources":["../../src/constants.ts"],"sourcesContent":["/**\n * Constants for smrt-projects package\n */\n\n/**\n * Default sync throttle duration in milliseconds (5 minutes)\n * Prevents excessive API calls by skipping sync if synced recently\n */\nexport const SYNC_THROTTLE_MS = 5 * 60 * 1000;\n"],"mappings":";AAQO,IAAM,mBAAmB,MAAS"}