improve CI privacy features

This commit is contained in:
mrrfv
2023-05-02 18:15:12 +02:00
parent c327c5ab42
commit 506b8f6a32
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -28,10 +28,10 @@ async function getZeroTrustLists() {
const cgps_lists = lists.filter(list => list.name.startsWith('CGPS List'));
if (!cgps_lists.length) return console.warn("No lists with matching name found - this is not an issue if you haven't created any filter lists before. Exiting.");
console.log(`Got ${lists.length} lists, ${cgps_lists.length} of which are CGPS lists that will be deleted.`);
if (!process.env.CI) console.log(`Got ${lists.length} lists, ${cgps_lists.length} of which are CGPS lists that will be deleted.`);
for (const list of cgps_lists) {
console.log(`Deleting list ` + process.env.CI ? "(redacted, running in CI)" : `${list.name} with ID ${list.id}`);
console.log(`Deleting list`, process.env.CI ? "(redacted, running in CI)" : `${list.name} with ID ${list.id}`);
const resp = await axios.request({
method: 'DELETE',
url: `https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID}/gateway/lists/${list.id}`,