All PRs produce a NuGet containing the fix. Not many people know about it or know how to find it. Would it be a good idea to pull out that link somehow and post it as a comment on the PR so that people can find it and test if it fixes their issue?
Absolutely!
Wild GREAT idea
I guess we need a webhook for this on the repo. I catched an example output and the important bit is this:
{
"action":"completed",
"check_run":{
...
"output":{
"title":"Build #20201029.7 succeeded",
"summary":"[0 errors / 230 warnings](https://dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_build/results?buildId=29627)",
"text":"[**Tests**](https://dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_build/results?buildId=29627&view=ms.vss-test-web.build-test-results-tab)<br /><ul><li> Failed: 0 (0.00%) </li><li> Passed: 800 (100.00%) </li><li> Other: 0 (0.00%) </li><li> Total: 800 </li></ul>",
"annotations_count":0,
"annotations_url":"https://api.github.com/repos/xamarin/XamarinCommunityToolkit/check-runs/1326884418/annotations"
},
...
}
We need to get that BuildId out of the Azure DevOps link and put it in a URL like: https://dev.azure.com/xamarin/public/_apis/build/builds/29627/artifacts?api-version=6.1-preview.5
That will list the artifacts, parse that JSON, and post that back as a comment to the PR
See, halfway done.
Additionally, it would be awesome if we could hide the comments previously made by this solution so we don't clutter the PR too much and confuse people with wrong links. See: https://docs.github.com/en/free-pro-team@latest/graphql/reference/mutations#minimizecomment
I got the webhook parsing and getting the artifact URL ready. Just need to post it back to the PR :)
OOoh here we go :D
https://github.com/xamarin/XamarinCommunityToolkit/pull/436#issuecomment-719765945
Now need to figure out how not to post these comments as my account... 馃槄
Ok I think I will let an azure function get kicked off by a webhook, that will compose the link to the nuget and to actually comment I will trigger a GitHub action so it can appear under the GitHub bot name.
I could create a GitHub app for it but that seems overkill somehow? I'm open to suggestions :)
@jfversluis sounds good to me, would be awesome if something similar could happen with the xamarin.forms
Yeah they also took the code formatting. So if we can prove this works, who knows what might happen :)