From 8168a9e85fdace79959100c0b4840a7108724cc9 Mon Sep 17 00:00:00 2001 From: Copple <10214025+kiwicopple@users.noreply.github.com> Date: Tue, 23 Nov 2021 13:47:50 +0800 Subject: [PATCH 1/2] Adds the latest sponsors --- web/sponsors.js | 1 + web/src/data/sponsors.json | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/web/sponsors.js b/web/sponsors.js index 385612ed914..324addddc8f 100644 --- a/web/sponsors.js +++ b/web/sponsors.js @@ -65,6 +65,7 @@ const writeFile = (data) => { const main = async () => { const sponsorsResponse = await fetchAllSponsors() + console.log('sponsorsResponse.totalCount', sponsorsResponse.totalCount) const formatted = formatResults(sponsorsResponse) writeFile(formatted) } diff --git a/web/src/data/sponsors.json b/web/src/data/sponsors.json index 613b7aedd92..5d175c86a57 100644 --- a/web/src/data/sponsors.json +++ b/web/src/data/sponsors.json @@ -73,7 +73,7 @@ }, { "tier": "$5 a month", - "sponsor": "alienzz" + "sponsor": "avatus" }, { "tier": "$5 a month", @@ -91,10 +91,6 @@ "tier": "$5 a month", "sponsor": "glassmonkey" }, - { - "tier": "$5 a month", - "sponsor": "zoutiyx" - }, { "tier": "$5 a month", "sponsor": "adammoyle" @@ -175,6 +171,10 @@ "tier": "$5 a month", "sponsor": "killshot13" }, + { + "tier": "$5 a month", + "sponsor": "brdtheo" + }, { "tier": "$19 a month", "sponsor": "d-mok" From cda6e39c278409b29cd0ba25fcc8ab946ef4908e Mon Sep 17 00:00:00 2001 From: Copple <10214025+kiwicopple@users.noreply.github.com> Date: Wed, 24 Nov 2021 10:29:33 +0800 Subject: [PATCH 2/2] Fix graphql query --- web/sponsors.js | 25 +++-- web/src/data/sponsors.json | 199 +------------------------------------ 2 files changed, 15 insertions(+), 209 deletions(-) diff --git a/web/sponsors.js b/web/sponsors.js index 324addddc8f..f24dd077fba 100644 --- a/web/sponsors.js +++ b/web/sponsors.js @@ -3,21 +3,23 @@ var axios = require('axios') var fs = require('fs') const query = ` -query BIO_QUERY($username: String!) { - organization(login: $username) { +query Sponsors { + organization(login: "supabase") { id - sponsorshipsAsMaintainer(first: 100) { - totalCount + sponsors(first: 100) { nodes { - createdAt - privacyLevel - tier { - name + ... on Organization { + id + createdAt + name : login } - sponsor { + ... on User { + id + createdAt login } } + totalCount } } } @@ -39,10 +41,11 @@ const fetchAllSponsors = async () => { }, } ) - return data.data.organization.sponsorshipsAsMaintainer + return data.data.organization.sponsors } const formatResults = (graphqlResponse) => { + console.log('graph', graphqlResponse) return graphqlResponse.nodes .filter((x) => !!x.sponsor) .map((x) => ({ @@ -65,7 +68,7 @@ const writeFile = (data) => { const main = async () => { const sponsorsResponse = await fetchAllSponsors() - console.log('sponsorsResponse.totalCount', sponsorsResponse.totalCount) + // console.log('sponsorsResponse.totalCount', sponsorsResponse.totalCount) const formatted = formatResults(sponsorsResponse) writeFile(formatted) } diff --git a/web/src/data/sponsors.json b/web/src/data/sponsors.json index 5d175c86a57..0637a088a01 100644 --- a/web/src/data/sponsors.json +++ b/web/src/data/sponsors.json @@ -1,198 +1 @@ -[ - { - "tier": "$5 a month", - "sponsor": "sabberworm" - }, - { - "tier": "$5 a month", - "sponsor": "calendee" - }, - { - "tier": "$5 a month", - "sponsor": "kylewelsby" - }, - { - "tier": "$5 a month", - "sponsor": "tinjaw" - }, - { - "tier": "$5 a month", - "sponsor": "ricdex" - }, - { - "tier": "$49 a month", - "sponsor": "Illyism" - }, - { - "tier": "$5 a month", - "sponsor": "lexifdev" - }, - { - "tier": "$5 a month", - "sponsor": "tacowaco" - }, - { - "tier": "$5 a month", - "sponsor": "kachar" - }, - { - "tier": "$19 a month", - "sponsor": "tpberntsen" - }, - { - "tier": "$5 a month", - "sponsor": "zeluizr" - }, - { - "tier": "$5 a month", - "sponsor": "AndersGerner" - }, - { - "tier": "$5 a month", - "sponsor": "stopyellingatme" - }, - { - "tier": "$19 a month", - "sponsor": "Marviel" - }, - { - "tier": "$19 a month", - "sponsor": "bookofdom" - }, - { - "tier": "$5 a month", - "sponsor": "juzhiyuan" - }, - { - "tier": "$5 a month", - "sponsor": "gregaltuna" - }, - { - "tier": "$5 a month", - "sponsor": "ctwhome" - }, - { - "tier": "$5 a month", - "sponsor": "avatus" - }, - { - "tier": "$5 a month", - "sponsor": "zlwaterfield" - }, - { - "tier": "$5 a month", - "sponsor": "Aaron-A" - }, - { - "tier": "$5 a month", - "sponsor": "gabrielmip" - }, - { - "tier": "$5 a month", - "sponsor": "glassmonkey" - }, - { - "tier": "$5 a month", - "sponsor": "adammoyle" - }, - { - "tier": "$5 a month", - "sponsor": "EvonuX" - }, - { - "tier": "$5 a month", - "sponsor": "KoreyPeters" - }, - { - "tier": "$49 a month", - "sponsor": "ymmtshny" - }, - { - "tier": "$19 a month", - "sponsor": "fefurst" - }, - { - "tier": "$5 a month", - "sponsor": "sebastianbachmann" - }, - { - "tier": "$5 a month", - "sponsor": "jvieirar" - }, - { - "tier": "$19 a month", - "sponsor": "dshukertjr" - }, - { - "tier": "$5 a month", - "sponsor": "CmplxStack" - }, - { - "tier": "$19 a month", - "sponsor": "roblack" - }, - { - "tier": "$5 a month", - "sponsor": "davilico05" - }, - { - "tier": "$19 a month", - "sponsor": "Kunstderfug" - }, - { - "tier": "$5 a month", - "sponsor": "hyochan" - }, - { - "tier": "$5 a month", - "sponsor": "chunterb" - }, - { - "tier": "$5 a month", - "sponsor": "madebyfabian" - }, - { - "tier": "$5 a month", - "sponsor": "jwanner83" - }, - { - "tier": "$5 a month", - "sponsor": "herbievine" - }, - { - "tier": "$5 a month", - "sponsor": "Lucostus" - }, - { - "tier": "$19 a month", - "sponsor": "peachp" - }, - { - "tier": "$5 a month", - "sponsor": "killshot13" - }, - { - "tier": "$5 a month", - "sponsor": "brdtheo" - }, - { - "tier": "$19 a month", - "sponsor": "d-mok" - }, - { - "tier": "$19 a month", - "sponsor": "lIIIIIIIIIIIIIIIIIIIII" - }, - { - "tier": "$5 a month", - "sponsor": "yujong-lee" - }, - { - "tier": "$5 a month", - "sponsor": "gregdenson" - }, - { - "tier": "$5 a month", - "sponsor": "LeDragunov" - } -] \ No newline at end of file +[] \ No newline at end of file