Skip to content

Commit

Permalink
chore(website): require two donations at lower tiers (#5055)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed May 23, 2022
1 parent 61699cd commit 91468ab
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 111 deletions.
108 changes: 7 additions & 101 deletions packages/website/data/sponsors.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"id": "David Johnston",
"image": "https://images.opencollective.com/blacksheepcode/976d69a/avatar.png",
"name": "David Johnston",
"tier": "supporter",
"tier": "contributor",
"totalDonations": 12000,
"website": "https://blacksheepcode.com"
},
Expand All @@ -162,31 +162,31 @@
"id": "Tripwire, Inc.",
"image": "https://images.opencollective.com/tripwire/7599e30/logo.png",
"name": "Tripwire, Inc.",
"tier": "supporter",
"tier": "contributor",
"totalDonations": 7500,
"website": "https://tripwire.com"
},
{
"id": "Evil Martians",
"image": "https://images.opencollective.com/evilmartians/707ab4d/logo.png",
"name": "Evil Martians",
"tier": "supporter",
"tier": "contributor",
"totalDonations": 7000,
"website": "https://evilmartians.com/"
},
{
"id": "Balsa",
"image": "https://images.opencollective.com/balsa/77de498/logo.png",
"name": "Balsa",
"tier": "supporter",
"tier": "contributor",
"totalDonations": 7000,
"website": "https://balsa.com"
},
{
"id": "Jeffrey Rennie",
"image": "https://images.opencollective.com/jeffrey-rennie/avatar.png",
"name": "Jeffrey Rennie",
"tier": "supporter",
"tier": "contributor",
"totalDonations": 6500
},
{
Expand All @@ -213,114 +213,20 @@
"totalDonations": 5000,
"website": "https://Indeed.com"
},
{
"id": "Andrey Sitnik",
"image": "https://images.opencollective.com/andrey-sitnik/11aeb28/avatar.png",
"name": "Andrey Sitnik",
"tier": "contributor",
"totalDonations": 4500,
"website": "https://sitnik.ru"
},
{
"id": "Corellium",
"image": "https://images.opencollective.com/corellium/aa8c228/logo.png",
"name": "Corellium",
"tier": "supporter",
"tier": "contributor",
"totalDonations": 3600,
"website": "https://www.corellium.com"
},
{
"id": "Kamino Ryo",
"image": "https://images.opencollective.com/kaminoryo/d1d9ff5/avatar.png",
"name": "Kamino Ryo",
"tier": "contributor",
"totalDonations": 3000
},
{
"id": "Kevin Smith",
"image": "https://images.opencollective.com/kevin-smith1/a343791/avatar.png",
"name": "Kevin Smith",
"tier": "contributor",
"totalDonations": 2500
},
{
"id": "Dani Gellis",
"image": "https://images.opencollective.com/dani-gellis1/avatar.png",
"name": "Dani Gellis",
"tier": "contributor",
"totalDonations": 2500
},
{
"id": "38elements",
"image": "https://images.opencollective.com/38elements/5dfbefe/avatar.png",
"name": "38elements",
"tier": "contributor",
"totalDonations": 2200,
"website": "https://japanese-document.github.io/react-redux/connect.html"
},
{
"id": "Gaëtan Bloch",
"image": "https://images.opencollective.com/gaetan-bloch/c5cfcb2/avatar.png",
"name": "Gaëtan Bloch",
"tier": "contributor",
"totalDonations": 2100
},
{
"id": "Softwear, BV",
"image": "https://images.opencollective.com/softwear_dev/dc2d34e/logo.png",
"name": "Softwear, BV",
"tier": "contributor",
"totalDonations": 2000,
"website": "https://www.softwearconnect.com"
},
{
"id": "Sean Lindsay",
"image": "https://images.opencollective.com/sean-lindsay/avatar.png",
"name": "Sean Lindsay",
"tier": "contributor",
"totalDonations": 2000
},
{
"id": "Jane Doe",
"image": "https://images.opencollective.com/jane-doe/avatar.png",
"name": "Jane Doe",
"tier": "contributor",
"totalDonations": 2000
},
{
"id": "MySportsInjury",
"image": "https://images.opencollective.com/my-sports-injury-ltd/518c583/logo.png",
"name": "MySportsInjury",
"tier": "supporter",
"tier": "contributor",
"totalDonations": 1500,
"website": "https://www.mysportsinjury.co.uk"
},
{
"id": "Philip Keiter",
"image": "https://images.opencollective.com/philip-keiter/1c359c0/avatar.png",
"name": "Philip Keiter",
"tier": "contributor",
"totalDonations": 1000
},
{
"id": "Toru Shimogaisho",
"image": "https://images.opencollective.com/gaishimo/f620536/avatar.png",
"name": "Toru Shimogaisho",
"tier": "contributor",
"totalDonations": 1000
},
{
"id": "Kazuhiro Kobayashi",
"image": "https://images.opencollective.com/kazuhiro-kobayashi/a1eeb73/avatar.png",
"name": "Kazuhiro Kobayashi",
"tier": "contributor",
"totalDonations": 1000
},
{
"id": "Masafumi Koba",
"image": "https://images.opencollective.com/ybiquitous/6a6913d/avatar.png",
"name": "Masafumi Koba",
"tier": "contributor",
"totalDonations": 1000
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,15 @@
width: 120px;
}

.tier-supporter,
.tier-contributor {
align-items: center;
gap: 4px 16px;
}

.tier-supporter img {
max-height: 45px;
width: 45px;
max-height: 60px;
width: 60px;
}

.tier-contributor img {
Expand Down
42 changes: 34 additions & 8 deletions tools/generate-sponsors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const excludedNames = new Set([

// These names *seem* to be spam websites, but we're not sure.
// If your name is mistakenly on this list, we're sorry; please let us know!
'420HUBS.COM',
'Deal Empire',
'Florian Studio',
'java',
Expand Down Expand Up @@ -163,19 +164,14 @@ async function main(): Promise<void> {
id: name,
image: fromAccount.imageUrl,
name: fromAccount.name,
tier:
slug === 'sponsor' || totalDonations >= 750_00
? 'sponsor'
: slug === 'supporter-plus' || totalDonations >= 150_00
? 'supporter'
: slug,
tier: getReportedTierSlug(slug, totalDonations),
totalDonations,
twitterHandle: fromAccount.twitterHandle,
website: fromAccount.website,
};
})
.filter(({ id, totalDonations }) => {
if (uniqueNames.has(id) || totalDonations < 10_00) {
.filter(({ id, tier }) => {
if (uniqueNames.has(id) || !tier) {
return false;
}

Expand All @@ -198,6 +194,36 @@ async function main(): Promise<void> {
);
}

function getReportedTierSlug(slug: string, totalDonations: number): string {
// Sponsors: Donors of $750 and/or a monthly amount of $100 or more
if (
totalDonations >= 750_00 ||
(slug === 'sponsor' && totalDonations >= 100_00)
) {
return 'sponsor';
}

// Gold Supporters: Donors of $150 and/or a monthly amount of $10 or more.
// We also only show gold supporters who have donated at least twice.
if (
totalDonations >= 150_00 ||
(slug === 'gold-supporter' && totalDonations >= 20_00)
) {
return 'supporter';
}

// Supporters: Donors of $50 and/or a monthly amount of $3 or more.
// We also only show supporters who have donated at least twice.
if (
totalDonations >= 50_00 ||
(slug === 'supporter' && totalDonations >= 6_00)
) {
return 'contributor';
}

return undefined;
}

main().catch(error => {
console.error(error);
process.exitCode = 1;
Expand Down

0 comments on commit 91468ab

Please sign in to comment.