feat: display author of changes in workflow tab (#5780)

This commit is contained in:
pr0grammm
2021-10-18 17:08:38 +05:30
committed by GitHub
parent 9627452de0
commit 3f607e41d9
30 changed files with 288 additions and 233 deletions

View File

@ -62,6 +62,10 @@ type AzurePullRequest = {
pullRequestId: number;
labels: AzureWebApiTagDefinition[];
sourceRefName: string;
createdBy?: {
displayName?: string;
uniqueName: string;
};
};
type AzurePullRequestCommit = { commitId: string };
@ -458,12 +462,15 @@ export default class API {
const status = labelToStatus(labelName, this.cmsLabelPrefix);
// Uses creationDate, as we do not have direct access to the updated date
const updatedAt = pullRequest.closedDate ? pullRequest.closedDate : pullRequest.creationDate;
const pullRequestAuthor =
pullRequest.createdBy?.displayName || pullRequest.createdBy?.uniqueName;
return {
collection,
slug,
status,
diffs: diffsWithIds,
updatedAt,
pullRequestAuthor,
};
}