mirror of
https://github.com/Nezumi-2711/cloudflare-gateway-pihole-scripts.git
synced 2026-09-22 13:38:37 +00:00
improve CI privacy features
This commit is contained in:
+2
-2
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user