Created
March 30, 2023 06:58
-
-
Save aycabas/bb523bda4cded0b246a5cc70d9b9ca0d to your computer and use it in GitHub Desktop.
retrieve the response value from DevOps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const devopsValue = req["value"]; | |
for (const obj of devopsValue) | |
{ | |
const tmp: DevOpsModel = { | |
id: obj["id"], url: obj["url"], | |
fields: { | |
title: obj["fields"]["System.Title"], | |
workItemType: obj["fields"]["System.WorkItemType"], | |
assigendTo: { | |
displayName: obj["fields"]["System.AssignedTo"]["displayName"], | |
links: {avatar: { href:obj["fields"]["System.AssignedTo"]["_links"]["avatar"]["href"],},}, | |
}, | |
state: obj["fields"]["System.State"], | |
}, | |
}; | |
devopsItems.push(tmp); | |
} | |
return devopsItems; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment