GitHub PR Comment TaskThis task has the functionality to receive plain text files and use the content to create a GitHub comment on a Pull Request. How to configure itUser Token GitHub Personal Access Token (it must have Repo permissions). Repository RepositoryOwner/Repository name. Use Pull Request Number Number of the pull request you want to comment. Use Path to the file/s Path to the file/s that you want to get the PR comments from. If you specify a folder, it will pick all the files that have the specified extension inside that folder Use sub-folders Checking this option will enable to search for all the files of the specified extensions in all the folders and sub-folders contained in the previously selected path Keep Comment History Checking this option will keep the previous automatic comments. Otherwise, will keep the last automatic comment only. Basic ExampleWe prepared a simple example using the task by creating a pull request from a branch containing a message example. When the PR is created, the Azure Pipelines build is triggered, and the GitHub PR Comment task picks up the plain text file from the PR branch and creates a message on the PR with its contents. Additionally, we tested the same example by turning off the Keep Comment History flag. Azure Pipelines SetupResultsKeeping previous automatic comments. Discarding previous automatic comments. Debug ModeThe task can be debugged by activating the "Enable System Diagnostics" option in the pipeline. Task output with Debug Flag enabled. |