diff --git a/CHANGELOG.md b/CHANGELOG.md
index a1167c2358f..a46fb604791 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- Linter enhancements & fixes
- Core
+ - Fix failure of AzureCommentReporter when there is no pull request found in ENV vars
- Documentation
diff --git a/docs/descriptors/xml_xmllint.md b/docs/descriptors/xml_xmllint.md
index 58d74296f4b..a31015d58a8 100644
--- a/docs/descriptors/xml_xmllint.md
+++ b/docs/descriptors/xml_xmllint.md
@@ -25,7 +25,7 @@ To apply file formatting you must set `XML_XMLLINT_CLI_LINT_MODE: file` and `XML
| Variable | Description | Default value |
|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|
| XML_XMLLINT_AUTOFORMAT | If set to `true`, it will reformat and reindent the output | `false` |
-| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | ` ` |
+| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | `` |
| XML_XMLLINT_ARGUMENTS | User custom arguments to add in linter CLI call
Ex: `-s --foo "bar"` | |
| XML_XMLLINT_FILTER_REGEX_INCLUDE | Custom regex including filter
Ex: `(src\|lib)` | Include every file |
| XML_XMLLINT_FILTER_REGEX_EXCLUDE | Custom regex excluding filter
Ex: `(test\|examples)` | Exclude no file |
diff --git a/megalinter/reporters/AzureCommentReporter.py b/megalinter/reporters/AzureCommentReporter.py
index 652f88080d5..6076935d4bf 100644
--- a/megalinter/reporters/AzureCommentReporter.py
+++ b/megalinter/reporters/AzureCommentReporter.py
@@ -40,12 +40,13 @@ def produce_report(self):
"SYSTEM_PULLREQUEST_PULLREQUESTID", ""
)
if SYSTEM_PULLREQUEST_PULLREQUESTID == "":
- logging.warning(
+ logging.info(
"[Azure Comment Reporter] Missing value SYSTEM_PULLREQUEST_PULLREQUESTID\n"
+ "You may need to configure a build validation policy to make it appear.\n"
+ "See https://docs.microsoft.com/en-US/azure/devops/repos/git/"
+ "branch-policies?view=azure-devops&tabs=browser#build-validation"
)
+ return
SYSTEM_TEAMPROJECT = urllib.parse.quote(config.get("SYSTEM_TEAMPROJECT"))
BUILD_REPOSITORY_ID = config.get("BUILD_REPOSITORY_ID")
BUILD_BUILDID = config.get("BUILD_BUILDID", config.get("BUILD_BUILD_ID"))