Skip to content

Commit

Permalink
chore: add explanation comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Jun 28, 2022
1 parent bb7c148 commit d3194d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/get-html.ts
Expand Up @@ -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");

Expand Down

0 comments on commit d3194d1

Please sign in to comment.