@@ -145,12 +145,8 @@ export class GitHubPullRequestReadError extends Schema.TaggedError<GitHubPullReq
145145 cause : Schema . Defect ( ) ,
146146 } ,
147147) {
148- get detail ( ) : string {
149- return `GitHub CLI returned an unreadable ${ this . operation } response.` ;
150- }
151-
152148 override get message ( ) : string {
153- return `GitHub CLI failed in ${ this . operation } : ${ this . detail } ` ;
149+ return `GitHub CLI returned an unreadable ${ this . operation } response. ` ;
154150 }
155151}
156152
@@ -162,12 +158,8 @@ export class GitHubViewerLoginUnavailableError extends Schema.TaggedError<GitHub
162158 cwd : Schema . String ,
163159 } ,
164160) {
165- get detail ( ) : string {
166- return "GitHub CLI returned no login for the authenticated account." ;
167- }
168-
169161 override get message ( ) : string {
170- return ` GitHub CLI failed in getViewerLogin: ${ this . detail } ` ;
162+ return " GitHub CLI returned no login for the authenticated account." ;
171163 }
172164}
173165
@@ -181,12 +173,8 @@ export class GitHubPullRequestUpdatedAtUnavailableError extends Schema.TaggedErr
181173 number : Schema . Int ,
182174 } ,
183175) {
184- get detail ( ) : string {
185- return `Pull request ${ this . repository } #${ this . number } reported no update time.` ;
186- }
187-
188176 override get message ( ) : string {
189- return `GitHub CLI failed in getPullRequestSummary: ${ this . detail } ` ;
177+ return `Pull request ${ this . repository } # ${ this . number } reported no update time. ` ;
190178 }
191179}
192180
@@ -198,12 +186,8 @@ export class GitHubDiffCursorError extends Schema.TaggedError<GitHubDiffCursorEr
198186 cwd : Schema . String ,
199187 } ,
200188) {
201- get detail ( ) : string {
202- return "The diff cursor was not one this pull request handed out." ;
203- }
204-
205189 override get message ( ) : string {
206- return `GitHub CLI failed in getPullRequestDiff: ${ this . detail } ` ;
190+ return "The diff cursor was not one this pull request handed out." ;
207191 }
208192}
209193
@@ -215,12 +199,8 @@ export class GitHubDiffCommitError extends Schema.TaggedError<GitHubDiffCommitEr
215199 cwd : Schema . String ,
216200 } ,
217201) {
218- get detail ( ) : string {
219- return "The named commit was not a commit sha." ;
220- }
221-
222202 override get message ( ) : string {
223- return `GitHub CLI failed in getPullRequestDiff: ${ this . detail } ` ;
203+ return "The named commit was not a commit sha." ;
224204 }
225205}
226206
@@ -234,15 +214,11 @@ export class GitHubDiffRevisionsUnavailableError extends Schema.TaggedError<GitH
234214 commit : Schema . optional ( Schema . String ) ,
235215 } ,
236216) {
237- get detail ( ) : string {
217+ override get message ( ) : string {
238218 return this . commit === undefined
239219 ? `Pull request #${ this . number } reported no usable base and head revisions.`
240220 : `Commit ${ this . commit } reported no usable revisions for this file.` ;
241221 }
242-
243- override get message ( ) : string {
244- return `GitHub CLI failed in getPullRequestDiffFileContents: ${ this . detail } ` ;
245- }
246222}
247223
248224/** A blob exists, but expanding it would be unsafe or would not produce text. */
@@ -255,15 +231,11 @@ export class GitHubDiffFileContentsUnavailableError extends Schema.TaggedError<G
255231 reason : Schema . Literals ( [ "oversized" , "binary" ] ) ,
256232 } ,
257233) {
258- get detail ( ) : string {
234+ override get message ( ) : string {
259235 return this . reason === "oversized"
260236 ? `The diff file '${ this . path } ' exceeds the 1 MB expansion limit.`
261237 : `The diff file '${ this . path } ' is binary.` ;
262238 }
263-
264- override get message ( ) : string {
265- return `GitHub CLI failed in getPullRequestDiffFileContents: ${ this . detail } ` ;
266- }
267239}
268240
269241/**
@@ -280,12 +252,8 @@ export class GitHubRepositorySelectorError extends Schema.TaggedError<GitHubRepo
280252 operation : Schema . String ,
281253 } ,
282254) {
283- get detail ( ) : string {
284- return "A repository was named that GitHub cannot address." ;
285- }
286-
287255 override get message ( ) : string {
288- return `GitHub CLI failed in ${ this . operation } : ${ this . detail } ` ;
256+ return "A repository was named that GitHub cannot address." ;
289257 }
290258}
291259
@@ -298,12 +266,8 @@ export class GitHubSubjectScopeError extends Schema.TaggedError<GitHubSubjectSco
298266 operation : Schema . String ,
299267 } ,
300268) {
301- get detail ( ) : string {
302- return "The named subject did not belong to the named pull request." ;
303- }
304-
305269 override get message ( ) : string {
306- return `GitHub CLI failed in ${ this . operation } : ${ this . detail } ` ;
270+ return "The named subject did not belong to the named pull request." ;
307271 }
308272}
309273
@@ -319,7 +283,7 @@ export class GitHubWorkflowApprovalRefusedError extends Schema.TaggedError<GitHu
319283 limit : Schema . Int ,
320284 } ,
321285) {
322- get detail ( ) : string {
286+ override get message ( ) : string {
323287 if ( this . reason === "head-list-truncated" ) {
324288 return `GitHub returned more than ${ this . limit } pull requests for this head branch.` ;
325289 }
@@ -328,10 +292,6 @@ export class GitHubWorkflowApprovalRefusedError extends Schema.TaggedError<GitHu
328292 }
329293 return `GitHub returned more than ${ this . limit } workflow runs awaiting approval.` ;
330294 }
331-
332- override get message ( ) : string {
333- return `GitHub CLI refused listWorkflowRunsRequiringApproval: ${ this . detail } ` ;
334- }
335295}
336296
337297/** GitHub omitted the immutable head identity needed to scope an approval safely. */
@@ -343,12 +303,8 @@ export class GitHubWorkflowApprovalHeadUnavailableError extends Schema.TaggedErr
343303 number : Schema . Int ,
344304 } ,
345305) {
346- get detail ( ) : string {
347- return `GitHub did not report a complete head revision for #${ this . number } .` ;
348- }
349-
350306 override get message ( ) : string {
351- return `GitHub CLI refused approve-workflows: ${ this . detail } ` ;
307+ return `GitHub did not report a complete head revision for # ${ this . number } . ` ;
352308 }
353309}
354310
@@ -361,12 +317,8 @@ export class GitHubWorkflowApprovalHeadChangedError extends Schema.TaggedError<G
361317 number : Schema . Int ,
362318 } ,
363319) {
364- get detail ( ) : string {
365- return `The head revision of #${ this . number } changed before its workflows could be approved.` ;
366- }
367-
368320 override get message ( ) : string {
369- return `GitHub CLI refused approve-workflows: ${ this . detail } ` ;
321+ return `The head revision of # ${ this . number } changed before its workflows could be approved. ` ;
370322 }
371323}
372324
0 commit comments