@@ -8,7 +8,7 @@ import type { Container } from '../../container';
88import type { GitCommit } from '../../git/models/commit' ;
99import type { PullRequest } from '../../git/models/pullRequest' ;
1010import { isRepository , Repository } from '../../git/models/repository' ;
11- import { isSha , isUncommitted , shortenRevision } from '../../git/models/revision.utils' ;
11+ import { isSha , isUncommitted , shortenRevision } from '../../git/models/revision.utils' ;
1212import type { GitUser } from '../../git/models/user' ;
1313import { getRemoteProviderMatcher } from '../../git/remotes/remoteProviders' ;
1414import type {
@@ -123,7 +123,7 @@ export class DraftService implements Disposable {
123123 }
124124
125125 // POST v1/drafts
126- const createDraftRsp = await this . connection . fetchGkDevApi ( 'v1/drafts' , {
126+ const createDraftRsp = await this . connection . fetchGkApi ( 'v1/drafts' , {
127127 method : 'POST' ,
128128 body : JSON . stringify ( {
129129 type : type ,
@@ -143,7 +143,7 @@ export class DraftService implements Disposable {
143143 type ChangesetResult = { data : DraftChangesetCreateResponse } ;
144144
145145 // POST /v1/drafts/:draftId/changesets
146- const createChangesetRsp = await this . connection . fetchGkDevApi ( `v1/drafts/${ draftId } /changesets` , {
146+ const createChangesetRsp = await this . connection . fetchGkApi ( `v1/drafts/${ draftId } /changesets` , {
147147 method : 'POST' ,
148148 body : JSON . stringify ( {
149149 // parentChangesetId: null,
@@ -205,7 +205,7 @@ export class DraftService implements Disposable {
205205 }
206206
207207 // POST /v1/drafts/:draftId/publish
208- const publishRsp = await this . connection . fetchGkDevApi ( `v1/drafts/${ draftId } /publish` , {
208+ const publishRsp = await this . connection . fetchGkApi ( `v1/drafts/${ draftId } /publish` , {
209209 method : 'POST' ,
210210 headers : providerAuthHeader ,
211211 body : prEntityIdBody != null ? JSON . stringify ( prEntityIdBody ) : undefined ,
@@ -216,7 +216,7 @@ export class DraftService implements Disposable {
216216
217217 type Result = { data : DraftResponse } ;
218218
219- const draftRsp = await this . connection . fetchGkDevApi ( `v1/drafts/${ draftId } ` , {
219+ const draftRsp = await this . connection . fetchGkApi ( `v1/drafts/${ draftId } ` , {
220220 method : 'GET' ,
221221 headers : providerAuthHeader ,
222222 } ) ;
@@ -324,7 +324,7 @@ export class DraftService implements Disposable {
324324
325325 @log ( )
326326 async deleteDraft ( id : string ) : Promise < void > {
327- await this . connection . fetchGkDevApi ( `v1/drafts/${ id } ` , { method : 'DELETE' } ) ;
327+ await this . connection . fetchGkApi ( `v1/drafts/${ id } ` , { method : 'DELETE' } ) ;
328328 }
329329
330330 @log < DraftService [ 'archiveDraft' ] > ( { args : { 1 : opts => JSON . stringify ( { ...opts , providerAuth : undefined } ) } } )
@@ -347,7 +347,7 @@ export class DraftService implements Disposable {
347347 } ;
348348 }
349349
350- const rsp = await this . connection . fetchGkDevApi ( `v1/drafts/${ draft . id } /archive` , {
350+ const rsp = await this . connection . fetchGkApi ( `v1/drafts/${ draft . id } /archive` , {
351351 method : 'POST' ,
352352 body :
353353 options ?. archiveReason != null
@@ -381,7 +381,7 @@ export class DraftService implements Disposable {
381381 }
382382
383383 const [ rspResult , changesetsResult ] = await Promise . allSettled ( [
384- this . connection . fetchGkDevApi ( `v1/drafts/${ id } ` , { method : 'GET' , headers : headers } ) ,
384+ this . connection . fetchGkApi ( `v1/drafts/${ id } ` , { method : 'GET' , headers : headers } ) ,
385385 this . getChangesets ( id ) ,
386386 ] ) ;
387387
@@ -458,7 +458,7 @@ export class DraftService implements Disposable {
458458 } ;
459459 }
460460
461- const rsp = await this . connection . fetchGkDevApi (
461+ const rsp = await this . connection . fetchGkApi (
462462 '/v1/drafts' ,
463463 {
464464 method : 'GET' ,
@@ -500,7 +500,7 @@ export class DraftService implements Disposable {
500500 type Result = { data : DraftChangesetResponse [ ] } ;
501501
502502 try {
503- const rsp = await this . connection . fetchGkDevApi ( `/v1/drafts/${ id } /changesets` , { method : 'GET' } ) ;
503+ const rsp = await this . connection . fetchGkApi ( `/v1/drafts/${ id } /changesets` , { method : 'GET' } ) ;
504504 if ( ! rsp . ok ) {
505505 await handleBadDraftResponse ( `Unable to open changesets for draft '${ id } '` , rsp , scope ) ;
506506 }
@@ -538,7 +538,7 @@ export class DraftService implements Disposable {
538538 type Result = { data : DraftPatchResponse } ;
539539
540540 // GET /v1/patches/:patchId
541- const rsp = await this . connection . fetchGkDevApi ( `/v1/patches/${ id } ` , { method : 'GET' } ) ;
541+ const rsp = await this . connection . fetchGkApi ( `/v1/patches/${ id } ` , { method : 'GET' } ) ;
542542
543543 if ( ! rsp . ok ) {
544544 await handleBadDraftResponse ( `Unable to open patch '${ id } '` , rsp , scope ) ;
@@ -610,7 +610,7 @@ export class DraftService implements Disposable {
610610 type Result = { data : Draft } ;
611611
612612 try {
613- const rsp = await this . connection . fetchGkDevApi ( `/v1/drafts/${ id } ` , {
613+ const rsp = await this . connection . fetchGkApi ( `/v1/drafts/${ id } ` , {
614614 method : 'PATCH' ,
615615 body : JSON . stringify ( { visibility : visibility } ) ,
616616 } ) ;
@@ -636,7 +636,7 @@ export class DraftService implements Disposable {
636636 type Result = { data : DraftUser [ ] } ;
637637
638638 try {
639- const rsp = await this . connection . fetchGkDevApi ( `/v1/drafts/${ id } /users` , { method : 'GET' } ) ;
639+ const rsp = await this . connection . fetchGkApi ( `/v1/drafts/${ id } /users` , { method : 'GET' } ) ;
640640
641641 if ( rsp ?. ok === false ) {
642642 await handleBadDraftResponse ( `Unable to get users for draft '${ id } '` , rsp , scope ) ;
@@ -664,7 +664,7 @@ export class DraftService implements Disposable {
664664 throw new Error ( 'No changes found' ) ;
665665 }
666666
667- const rsp = await this . connection . fetchGkDevApi ( `/v1/drafts/${ id } /users` , {
667+ const rsp = await this . connection . fetchGkApi ( `/v1/drafts/${ id } /users` , {
668668 method : 'POST' ,
669669 body : JSON . stringify ( {
670670 id : id ,
@@ -690,7 +690,7 @@ export class DraftService implements Disposable {
690690 async removeDraftUser ( id : string , userId : DraftUser [ 'userId' ] ) : Promise < boolean > {
691691 const scope = getLogScope ( ) ;
692692 try {
693- const rsp = await this . connection . fetchGkDevApi ( `/v1/drafts/${ id } /users/${ userId } ` , { method : 'DELETE' } ) ;
693+ const rsp = await this . connection . fetchGkApi ( `/v1/drafts/${ id } /users/${ userId } ` , { method : 'DELETE' } ) ;
694694
695695 if ( rsp ?. ok === false ) {
696696 await handleBadDraftResponse ( `Unable to update user ${ userId } for draft '${ id } '` , rsp , scope ) ;
@@ -718,7 +718,7 @@ export class DraftService implements Disposable {
718718 async getRepositoryIdentity ( draftId : Draft [ 'id' ] , repoId : GkRepositoryId ) : Promise < RepositoryIdentity > {
719719 type Result = { data : RepositoryIdentityResponse } ;
720720
721- const rsp = await this . connection . fetchGkDevApi ( `/v1/drafts/${ draftId } /git-repositories/${ repoId } ` , {
721+ const rsp = await this . connection . fetchGkApi ( `/v1/drafts/${ draftId } /git-repositories/${ repoId } ` , {
722722 method : 'GET' ,
723723 } ) ;
724724 const data = ( ( await rsp . json ( ) ) as Result ) . data ;
@@ -862,7 +862,7 @@ export class DraftService implements Disposable {
862862 } ) ;
863863
864864 try {
865- const rsp = await this . connection . fetchGkDevApi (
865+ const rsp = await this . connection . fetchGkApi (
866866 'v1/drafts/counts' ,
867867 {
868868 method : 'POST' ,
0 commit comments