diff --git a/.github/workflows/external-plugin-pr-quality-gates.yml b/.github/workflows/external-plugin-pr-quality-gates.yml index e2d00b8e..b900c212 100644 --- a/.github/workflows/external-plugin-pr-quality-gates.yml +++ b/.github/workflows/external-plugin-pr-quality-gates.yml @@ -145,7 +145,14 @@ jobs: summary: 'No changed external plugin entries were detected in this PR.', }; - if (shouldRun) { + if ('${{ needs.detect-changed-plugins.result }}' === 'failure' || '${{ needs.detect-changed-plugins.result }}' === 'cancelled') { + qualityResult = { + overall_status: 'infra_error', + failure_class: 'infra', + checked_plugins: [], + summary: 'External plugin PR change detection failed unexpectedly. Re-run this workflow.', + }; + } else if (shouldRun) { if (qualityJobResult === 'failure' || qualityJobResult === 'cancelled') { qualityResult = { overall_status: 'infra_error', @@ -167,7 +174,7 @@ jobs: const stateLabel = qualityResult.failure_class === 'submitter_fixes' ? 'requires-submitter-fixes' - : qualityResult.overall_status === 'pass' + : qualityResult.overall_status === 'pass' || !shouldRun ? 'ready-for-review' : 'awaiting-review'; diff --git a/eng/external-plugin-pr-quality-gates.mjs b/eng/external-plugin-pr-quality-gates.mjs index 9cd1bfbe..be948abe 100644 --- a/eng/external-plugin-pr-quality-gates.mjs +++ b/eng/external-plugin-pr-quality-gates.mjs @@ -34,7 +34,8 @@ export function buildSourceTreeUrl(plugin) { return `https://github.com/${sourceRepo}/tree/${encodedLocator}`; } - return `https://github.com/${sourceRepo}/tree/${encodedLocator}/${normalizedPath}`; + const encodedPath = encodePathLikeValue(normalizedPath); + return `https://github.com/${sourceRepo}/tree/${encodedLocator}/${encodedPath}`; } function aggregateResultStatus(pluginResults) {