From d3194d1b0324f758f9ae466494002a5ead93fecc Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Sun, 26 Jun 2022 20:06:23 -0400 Subject: [PATCH] chore: add explanation comment --- lib/get-html.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/get-html.ts b/lib/get-html.ts index 2a98c9455..e27b9a25a 100644 --- a/lib/get-html.ts +++ b/lib/get-html.ts @@ -30,6 +30,9 @@ export const getHtml = async ( // get only the HTML we care about to avoid unnecessary cache updates $('[data-testid="callout"]').remove(); const data = $("#article-contents").parent().parent(); + // Remove all classes from the HTML, except the ones that are actively used in the code to get payload examples. + // This is done to avoid unnecessary cache updates in order to reduce noise from automated Pull Requests + // https://github.com/octokit/webhooks/issues/642 data.find("*").each((i, el) => { const classes = $(el).attr("class");