generated from ztimson/template
Fixed label condition check 💀
This commit is contained in:
@@ -28,7 +28,7 @@ dotenv.config({path: '.env.local', override: true, quiet: true, debug: false});
|
||||
console.log(`Reviewing: ${root}\n`);
|
||||
const info = await fetch(`${git}/api/v1/repos/${owner}/${repo}/pulls/${pr}`)
|
||||
.then(async resp => { return resp.ok ? resp.json() : throw new Error(`${resp.status} ${await resp.text()}`); });
|
||||
if(info.labels?.length > 0 || !info.labels.some(l => l.name === labelEnabled)) {
|
||||
if(info.labels?.length > 0 && !info.labels.some(l => l.name === labelEnabled)) {
|
||||
console.log('Skipping');
|
||||
return process.exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user