azure-devops-dotnet-samples
azure-devops-dotnet-samples copied to clipboard
Need sample for linking GitHub issue
I'm trying to link a gitHub issue on an AzureDevOps repo with github enabled.
I have tried adding patch data like so, { Operation = Operation.Add, Path = "/relations/-", Value = new { //url = payload.Issue.HtmlUrl, url = @"https://github.com/issueURl", rel = "ArtifactLink", title = payload.Issue.Title,
attributes = new
{
name = "issue",
comment = "GitHub Issue"
}
}
});
But it keeps erroring with Invalid Resource Link Target
Looking at an existing WorkItem, All links are formatted as so:
{
"rel": "ArtifactLink",
"url": "vstfs:///GitHub/Issue/guid",
"attributes": {
"authorizedDate": "2019-10-04T10:12:48.89Z",
"id": 2308037,
"resourceCreatedDate": "2019-10-04T10:12:48.89Z",
"resourceModifiedDate": "2019-10-04T10:12:48.89Z",
"revisedDate": "9999-01-01T00:00:00Z",
"name": "GitHub Issue"
}
}
How does this vstfs url get generated?