Skip to content

Commit

Permalink
Add AzureCommentReporter instructions (#4480)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdovaz authored Jan 11, 2025
1 parent 6de3153 commit ef01e89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
8 changes: 7 additions & 1 deletion docs/reporters/AzureCommentReporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ Example:
docker run -v $(System.DefaultWorkingDirectory):/tmp/lint \
--env-file <(env | grep -e SYSTEM_ -e BUILD_ -e TF_ -e AGENT_) \
-e SYSTEM_ACCESSTOKEN=$(System.AccessToken) \
-e SYSTEM_COLLECTIONURI=$(System.CollectionUri) \
-e SYSTEM_PULLREQUEST_PULLREQUESTID=$(System.PullRequest.PullRequestId) \
-e SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI=$(System.PullRequest.SourceRepositoryURI) \
-e SYSTEM_TEAMPROJECT="$(System.TeamProject)" \
-e BUILD_BUILD_ID=$(Build.BuildId) \
-e BUILD_REPOSITORY_ID=$(Build.Repository.ID) \
-e GIT_AUTHORIZATION_BEARER=$(System.AccessToken) \
oxsecurity/megalinter:v8
displayName: Run MegaLinter
Expand All @@ -43,4 +49,4 @@ Example:
| AZURE_COMMENT_REPORTER_LINKS_TYPE | Set to `build` if you want comments linking to target Build and not artifacts page | `artifacts` |
| AZURE_COMMENT_REPORTER_REPLACE_WITH_SPACES | Do not replaces %20 by spaces in repo name if set to false | `true` |
| REPORTERS_MARKDOWN_TYPE | Set to `simple` to avoid external images in generated markdown | `advanced` |
| JOB_SUMMARY_ADDITIONAL_MARKDOWN | Custom markdown to add at the end of the summary message | <!-- --> |
| JOB_SUMMARY_ADDITIONAL_MARKDOWN | Custom markdown to add at the end of the summary message | <!-- --> |
9 changes: 0 additions & 9 deletions megalinter/reporters/AzureCommentReporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
"""
Azure Comment reporter
Post a comment on Azure Pipelines Pull Requests
Requires the following vars sent to docker run:
- SYSTEM_ACCESSTOKEN
- SYSTEM_COLLECTIONURI
- SYSTEM_PULLREQUEST_PULLREQUESTID
- SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI
- SYSTEM_TEAMPROJECT
- BUILD_BUILDID
- BUILD_REPOSITORY_ID
"""
import logging
import urllib.parse
Expand Down

0 comments on commit ef01e89

Please sign in to comment.