Skip to content

Commit

Permalink
Fix sponsors workflow response parser
Browse files Browse the repository at this point in the history
  • Loading branch information
huxingyi committed Dec 17, 2022
1 parent 1dd216c commit 28601a9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/update-sponsors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ jobs:
}
}
`;
const rawResponse = await github.graphql(query);
console.log(rawResponse);
const response = JSON.parse(rawResponse);
const response = await github.graphql(query);
let html = '';
for (const node of response.data.user.sponsorshipsAsMaintainer.nodes) {
for (const node of response.user.sponsorshipsAsMaintainer.nodes) {
html += '<a href="' + node.sponsor.url + '" title="' + node.sponsor.login + (node.sponsor.name ? (' (' + node.sponsor.name + ')') : '') + '" target=_blank><image src="' + node.sponsor.avatarUrl + '" alt="@' + node.sponsor.login + '" width="35" height="35" style="border-radius: 17px;" /></a>\n';
}
if ('' !== html) {
Expand Down

0 comments on commit 28601a9

Please sign in to comment.