diff --git a/README.md b/README.md index f4f1d8dca..c84e86ede 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ For an introduction of what the project aims to achieve, [please check out the w ## Sponsors -Fornjot is supported by [**@MitchellHansen**](https://github.com/MitchellHansen), [**@webtrax-oz**](https://github.com/webtrax-oz), [**@seanjensengrey**](https://github.com/seanjensengrey), [**@reivilibre**](https://github.com/reivilibre), [**@lthiery**](https://github.com/lthiery), [**@ahdinosaur**](https://github.com/ahdinosaur), [**@martindederer**](https://github.com/martindederer), [**@bollian**](https://github.com/bollian), [**@nullstyle**](https://github.com/nullstyle), [**@tachiniererin**](https://github.com/tachiniererin), [**@HalfVoxel**](https://github.com/HalfVoxel), [**@sucaba**](https://github.com/sucaba), [**@Kethku**](https://github.com/Kethku), [**@jessebraham**](https://github.com/jessebraham), [**@MattOslin**](https://github.com/MattOslin), [**@jminer**](https://github.com/jminer), [**@jeevcat**](https://github.com/jeevcat), [**@voxpelli**](https://github.com/voxpelli), [**@U007D**](https://github.com/U007D), [**@guillaumechauvat**](https://github.com/guillaumechauvat), [**@mayfieldiv**](https://github.com/mayfieldiv), [**@bglw**](https://github.com/bglw), [**@hansihe**](https://github.com/hansihe), and [my other awesome sponsors](https://github.com/sponsors/hannobraun). Thank you! +Fornjot is supported by [**@MitchellHansen**](https://github.com/MitchellHansen), [**@webtrax-oz**](https://github.com/webtrax-oz), [**@seanjensengrey**](https://github.com/seanjensengrey), [**@reivilibre**](https://github.com/reivilibre), [**@lthiery**](https://github.com/lthiery), [**@ahdinosaur**](https://github.com/ahdinosaur), [**@martindederer**](https://github.com/martindederer), [**@bollian**](https://github.com/bollian), [**@sucaba**](https://github.com/sucaba), [**@nullstyle**](https://github.com/nullstyle), [**@tachiniererin**](https://github.com/tachiniererin), [**@HalfVoxel**](https://github.com/HalfVoxel), [**@Kethku**](https://github.com/Kethku), [**@jessebraham**](https://github.com/jessebraham), [**@MattOslin**](https://github.com/MattOslin), [**@jminer**](https://github.com/jminer), [**@voxpelli**](https://github.com/voxpelli), [**@U007D**](https://github.com/U007D), [**@guillaumechauvat**](https://github.com/guillaumechauvat), [**@mayfieldiv**](https://github.com/mayfieldiv), [**@bglw**](https://github.com/bglw), [**@hansihe**](https://github.com/hansihe), [**@romixlab**](https://github.com/romixlab), and [my other awesome sponsors](https://github.com/sponsors/hannobraun). Thank you! **Please consider [supporting me too](https://github.com/sponsors/hannobraun), to help make Fornjot sustainable long-term.** diff --git a/tools/automator/src/sponsors.rs b/tools/automator/src/sponsors.rs index dd983110a..d981e7183 100644 --- a/tools/automator/src/sponsors.rs +++ b/tools/automator/src/sponsors.rs @@ -21,6 +21,7 @@ impl Sponsors { ... on User { login sponsorshipForViewerAsSponsorable { + privacyLevel createdAt tier { monthlyPriceInDollars @@ -31,6 +32,7 @@ impl Sponsors { ... on Organization { login sponsorshipForViewerAsSponsorable { + privacyLevel createdAt tier { monthlyPriceInDollars @@ -63,6 +65,12 @@ impl Sponsors { .nodes .into_iter() .filter_map(|node| { + if let QueryResultSponsorshipPrivacy::Private = + node.sponsorship_for_viewer_as_sponsorable.privacy_level + { + return None; + } + if node .sponsorship_for_viewer_as_sponsorable .is_one_time_payment @@ -190,6 +198,9 @@ pub struct QueryResultSponsorsNode { #[derive(Debug, serde::Deserialize)] pub struct QueryResultSponsorable { + #[serde(rename = "privacyLevel")] + pub privacy_level: QueryResultSponsorshipPrivacy, + #[serde(rename = "createdAt")] pub created_at: DateTime, @@ -199,6 +210,15 @@ pub struct QueryResultSponsorable { pub is_one_time_payment: bool, } +#[derive(Debug, serde::Deserialize)] +pub enum QueryResultSponsorshipPrivacy { + #[serde(rename = "PUBLIC")] + Public, + + #[serde(rename = "PRIVATE")] + Private, +} + #[derive(Debug, serde::Deserialize)] pub struct QueryResultSponsorableTier { #[serde(rename = "monthlyPriceInDollars")]