Azure / pytest-azurepipelines

Plugin for pytest that makes it simple to work with Azure Pipelines
MIT License
113 stars 36 forks source link

add warnings as comments to pull requests #75

Open ttekampe opened 2 years ago

ttekampe commented 2 years ago

Hi,

currently pytest-azurepipelines reports warnings that occur during the tests here: https://github.com/Azure/pytest-azurepipelines/blob/025be9a383ac19e7543602a1a31ae0cb3f363601/pytest_azurepipelines.py#L207

For my projects I would like to also automatically add comments on PRs, such that in order to complete a PR where warnings occured during the CI run, a developer would need to click the "resolved" button, or even better, fix the code.

This could be done via the pull request rest api. Here is also an example on how to use this rest api using azure dev ops pipeline variables

Of course it should only happen if explicitly asked for via another command line option.

I could file a PR for this feature if the maintainers of this repo approve the idea.