Plugins: Improve levitate report on forks (#107252)

This commit is contained in:
Hugo Kiyodi Oshiro
2025-07-08 14:52:02 +02:00
committed by GitHub
parent d5a1781fb6
commit 6c1ff32501
3 changed files with 12 additions and 1 deletions

View File

@ -4,6 +4,8 @@ const printAffectedPluginsSection = require('./levitate-show-affected-plugins');
const data = JSON.parse(fs.readFileSync('data.json', 'utf8'));
const isFork = Boolean(process.env.IS_FORK || false);
function stripAnsi(str) {
return str.replace(/\x1b\[[0-9;]*m/g, '');
}
@ -30,7 +32,8 @@ if (data.changes.length > 0) {
markdown += printSection('Changes', data.changes);
}
if (data.removals.length > 0 || data.changes.length > 0) {
// The logic below would need access to secrets for accessing BigQuery, however that's not available on forks.
if ((data.removals.length > 0 || data.changes.length > 0) && !isFork) {
markdown += printAffectedPluginsSection(data);
}