Skip to content

Commit

Permalink
Merge pull request #1542 from hannobraun/automation
Browse files Browse the repository at this point in the history
Update release automation
  • Loading branch information
hannobraun authored Jan 27, 2023
2 parents 691e90b + 9532db5 commit e09ae26
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tools/automator/src/sponsors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ impl Sponsors {
tier {
monthlyPriceInDollars
}
isOneTimePayment
}
}
... on Organization {
Expand All @@ -33,6 +34,7 @@ impl Sponsors {
tier {
monthlyPriceInDollars
}
isOneTimePayment
}
}
}
Expand All @@ -48,7 +50,14 @@ impl Sponsors {
.sponsors
.nodes
.into_iter()
.map(|node| {
.filter_map(|node| {
if node
.sponsorship_for_viewer_as_sponsorable
.is_one_time_payment
{
return None;
}

let login = node.login;
let since =
node.sponsorship_for_viewer_as_sponsorable.created_at;
Expand All @@ -57,11 +66,11 @@ impl Sponsors {
.tier
.monthly_price_in_dollars;

Sponsor {
Some(Sponsor {
login,
since,
dollars,
}
})
})
.collect::<Vec<_>>();

Expand Down Expand Up @@ -173,6 +182,9 @@ pub struct QueryResultSponsorable {
pub created_at: DateTime<Utc>,

pub tier: QueryResultSponsorableTier,

#[serde(rename = "isOneTimePayment")]
pub is_one_time_payment: bool,
}

#[derive(Debug, serde::Deserialize)]
Expand Down

0 comments on commit e09ae26

Please sign in to comment.