Skip to content

Commit

Permalink
Merge pull request #2 from tweedegolf/release-order
Browse files Browse the repository at this point in the history
Release order
  • Loading branch information
marlonbaeten authored Jan 13, 2025
2 parents 4e71a9a + 322d0fa commit ee78fc5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "etes"
version = "0.1.0"
version = "0.2.0"
edition = "2021"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ impl GitHubState {
.replace("$owner", &config.github_owner)
.replace("$name", &config.github_repo);

let ressponse = reqwest::Client::new()
let response = reqwest::Client::new()
.post("https://api.github.com/graphql")
.json(&json!({ "query": request_body }))
.header("User-Agent", "etes")
.header("Authorization", format!("Bearer {}", config.github_token))
.send()
.await?;

let root: GraphRoot = ressponse.json().await?;
let root: GraphRoot = response.json().await?;

GitHubState::from_graphql(root).await
}
Expand Down
7 changes: 5 additions & 2 deletions src/query.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
query {
repository(owner: "$owner", name: "$name") {
releases(last:3) {
repository(owner: "kiesraad", name: "abacus") {
releases(
first: 3
orderBy: {field: CREATED_AT, direction: DESC}
) {
edges {
node {
name
Expand Down

0 comments on commit ee78fc5

Please sign in to comment.