Closed praneetloke closed 2 years ago
Hi @praneetloke this looks awesome at a glance, unfortunately a few things came up and I'm slipping with reviewing this on time, likely will review on Monday.
@RobbieMcKinstry thank you for the review! Just wanted to post a quick note that I am looking into them.
@RobbieMcKinstry I've added inline replies to your comments. Can you please have another look at this?
Any idea why the status check is still pending?
Any idea why the status check is still pending?
For PR from forks, you'll need to explicitly run /azp run
to run the PR build in this repo.
/azp run
/azp run
Yeah not sure what's going on with the test failures. They were (and still are) passing on my machine. We'll have to look at the build logs to see what's going. We could run a build manually with the variable TASK_TEST_TRACE=1
to get debug logs.
/azp run
/azp run
/azp run
/azp run
name
,publisher
, andgalleryFlags
in thevss-extension.json
file, you have reverted them.id
,name
,author
, you have reverted them.vss-extension.json
andtask.json
, OR I didn't change them.Related to #110.
This PR adds support for adding the Pulumi command log output as a PR comment to pull requests created in Azure Repositories. In order to make this work, the extension now requires the the
vso.code_write
OAuth2 scope explicitly. With the new scope builds will get an access token that has that specific permission.As for the approach I took, I started out implementing this as a "post-execution" step which is why I am writing the logs to a temp file and reading that back again. I eventually backtracked on that since there could be a delay between when the Pulumi step is actually completed vs. when the whole job completes, which is when the post-execution steps run. A job can contain many steps. I favored creating the PR comment asap rather than at the end. Anyway, I kept the part that was stream the logs to a file rather than keeping it in memory. I can change that if you'd like, but I sort of liked dealing with a stable file, though it's temporary. The file gets removed after the PR comment is added successfully.
Screenshots
Example of the permissions users have to review for the new version ![image](https://user-images.githubusercontent.com/1466314/189231758-9c18704a-8689-4434-907a-d60ef626fb15.png) Example of the PR comment ![Screenshot 2022-09-08 at 12-13-01 Pull request 22 Export the random string value - Repos](https://user-images.githubusercontent.com/1466314/189231560-5ee7fd3c-155f-4786-bcfe-01bb7aea465d.png)