Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AzureCommentReporter instructions #4480

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
echoix marked this conversation as resolved.
Show resolved Hide resolved
"""
import logging
import urllib.parse
Expand Down
Loading