cqse / Teamscale-AzureDevOps-Extension

Plugin for Azure DevOps that provides: Extension for the WorkItems pages to show a TestGap badge, Pipeline Task to upload coverage, findings, and other reports to Teamscale
https://marketplace.visualstudio.com/items?itemName=CQSEGmbH.teamscale-azure-devops-plugin
Apache License 2.0
3 stars 1 forks source link

Fix upload for pull request builds #26

Closed karottenreibe closed 4 years ago

karottenreibe commented 4 years ago

don't follow symlinks when searching for files This may cause unintended behaviour and be a security problem.

fix: root directory for search with pattern is one folder too far up This may cause permission exceptions when the plugin incorrectly searches folders that it has no access to

I verified that this was broken before and now works manually against our ADO instance

fix: revision used for upload from pull request builds is incorrect We read BUILD_SOURCEVERSION but this is the simulated merge commit for the PR, which TS never sees. Instead there's SYSTEM_PULLREQUEST_SOURCECOMMITID that holds the tip of the source branch.

I verified that the commit in that variable is correct in our pipelines for PR builds

rottkit commented 4 years ago

I just read that you have manually tested the new behaviour. So leave out the second point of my review, if you do not think it brings additional benefit if I test it again. 🙂

karottenreibe commented 4 years ago

good point, I didn't know we customize prettier (early on I had heard we use the defaults). I copied our .prettierrc and reformatted the file

rottkit commented 4 years ago

As discussed, did not test but from a code perspective this is fine. Thanks a lot for the fix 🙂