From 0c16cef574d808ee0b01c759db94650536551464 Mon Sep 17 00:00:00 2001 From: mo Date: Mon, 2 May 2022 10:11:53 -0500 Subject: [PATCH] server side now actually returning git tags shaped like git tags Signed-off-by: mo --- .../src/api/AzureDevOpsApi.ts | 21 +++++++++---------- plugins/azure-devops-common/src/types.ts | 12 +++-------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts b/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts index ac95aa0281..06b9eded36 100644 --- a/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts +++ b/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts @@ -145,6 +145,11 @@ export class AzureDevOpsApi { gitRepository.id as string, projectName, 'tags', + false, + false, + false, + false, + true, ); this.logger?.warn(JSON.stringify(tagRefs)); @@ -394,18 +399,12 @@ export function mappedRepoBuild(build: Build): RepoBuild { }; } -export function mappedGitTag(pullRequest: GitRef, linkBaseUrl: string): GitTag { +export function mappedGitTag(gitRef: GitRef, linkBaseUrl: string): GitTag { return { - pullRequestId: 5, - repoName: 'sup', - title: 'hello title', - uniqueName: 'N/A', - createdBy: 'N/A', - creationDate: 'plop', - sourceRefName: 'sourceRefName', - targetRefName: 'targetRefName', - status: PullRequestStatus.NotSet, - isDraft: false, + objectId: gitRef.objectId, + peeledObjectId: gitRef.peeledObjectId, + name: gitRef.name, + createdBy: gitRef.creator?.displayName ?? 'N/A', link: `${linkBaseUrl}/5`, }; } diff --git a/plugins/azure-devops-common/src/types.ts b/plugins/azure-devops-common/src/types.ts index 7391b7e41e..3cf3a9fa9c 100644 --- a/plugins/azure-devops-common/src/types.ts +++ b/plugins/azure-devops-common/src/types.ts @@ -109,16 +109,10 @@ export enum PullRequestStatus { } export type GitTag = { - pullRequestId?: number; - repoName?: string; - title?: string; - uniqueName?: string; + objectId?: string; + peeledObjectId?: string; + name?: string; createdBy?: string; - creationDate?: string; - sourceRefName?: string; - targetRefName?: string; - status?: PullRequestStatus; - isDraft?: boolean; link: string; };