diff --git a/lib/check.js b/lib/check.js index cef0241c5..8a04c2db5 100644 --- a/lib/check.js +++ b/lib/check.js @@ -267,6 +267,16 @@ async function doIt() { return Promise.reject('Cannot find PR'); } + const files = await getGithub(`https://api.github.com/repos/ioBroker/ioBroker.repositories/pulls/${prID}/files`); + let fileNames = []; + files.forEach( f=>{fileNames.push(f.filename)}); + + console.log('Files changed:'); + fileNames.forEach( f=>{console.log(` ${f}`)}); + + const isLatest = fileNames.includes('sources-dist.json'); + const isStable = fileNames.includes('sources-dist-stable.json') + const links = await detectAffectedAdapter(prID); const comments = [{text: TEXT_COMMENT_TITLE}]; let someChecked = false; @@ -322,9 +332,11 @@ async function doIt() { } } - comments.push({text:`\n`, noDecorate: true}); - comments.push({text:`Adapter releases: https://www.iobroker.dev/adapter/${adapterName}/releases\n`, noDecorate: true}); - comments.push({text:`Adapter statistic: https://www.iobroker.dev/adapter/${adapterName}/statistics\n`, noDecorate: true}); + if (isStable) { + comments.push({text:`\n`, noDecorate: true}); + comments.push({text:`Adapter releases: https://www.iobroker.dev/adapter/${adapterName}/releases\n`, noDecorate: true}); + comments.push({text:`Adapter statistic: https://www.iobroker.dev/adapter/${adapterName}/statistics\n`, noDecorate: true}); + } } if (!someChecked) { comments.push({text: 'No changed adapters found', noDecorate: true});