Skip to content

Commit

Permalink
feat(view) : cluster 요약에 해당 cluster가 포함하는 release tag 추가 (githru#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakseong committed Oct 6, 2024
1 parent 63eed01 commit d988696
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type Cluster = {
clusterId: number;
summary: Summary;
latestReleaseTag: string;
clusterTags: string[];
};

export type AuthSrcMap = Record<string, string>;
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export function getInitData(data: GlobalProps["data"]): Cluster[] {
count: clusterNode.commitNodeList.length - 1,
},
},
clusterTags: [],
latestReleaseTag: "",
};

Expand All @@ -94,13 +95,18 @@ export function getInitData(data: GlobalProps["data"]): Cluster[] {

// get releaseTags in cluster commitNodeList
commitNode.commit.releaseTags?.map((tag) => {
clusterTags.push(tag);
if (clusterTags.indexOf(tag) === -1) {
clusterTags.push(tag);
}
return clusterTags;
});

return commitNode;
});

// set release tag in cluster
cluster.clusterTags = clusterTags;

// set latset release tag
const latestReleaseTag = getCommitLatestTag(clusterTags);
cluster.latestReleaseTag = latestReleaseTag;
Expand Down

0 comments on commit d988696

Please sign in to comment.