Create a pull request comment if a CI is trigged by Pull Request.
How to use
Install this extension to your project. Find the CreatePRCommentTask.
Azure DevOps PAT
Select Azure DevOps Personal Access Token. or you can create new one
If the pipeline is executed by Pull Request Validation, this task create a Pull Request Comment.
On the Comment, you can use Variables. The variables will be substituted by the actual value. e.g. $(CWI.Id).
The comment becomes message body of your Pull Request Comment.
Personal Access Token Service Connection
Put your Azure DevOps personal access token in PAT. The PAT requires permission to write Code. For more detail, Pull Request Thread Comments - Create. Connection name is just a label of this service connection. Server URL is not used currently, however it might be good as memo which you use it for.
Sample of the Comment.
CredScan reports a <a href="https://dev.azure.com/csedevops/DevSecOps/_workitems/edit/$(CWI.Id)">Bug</a> created. Please review it.