Skip to content

Commit

Permalink
Merge pull request #174 from MarcoIeni/chore-update-octocrab-to-versi…
Browse files Browse the repository at this point in the history
…on-0.42

chore: update octocrab to version 0.42
  • Loading branch information
Kobzol authored Nov 15, 2024
2 parents a223442 + 7e759f1 commit 84d9724
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 79 deletions.
112 changes: 36 additions & 76 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ serde_json = "1.0"
toml = "0.8"

# GitHub
octocrab = "0.35.0"
octocrab = "0.42.0"

# Async
futures = "0.3"
Expand Down
4 changes: 3 additions & 1 deletion src/github/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ pub async fn load_repositories(

let mut repositories = HashMap::default();
for installation in installations {
let installation_client = client.installation(installation.id);
let installation_client = client
.installation(installation.id)
.context("failed to install client")?;

let repos = match load_installation_repos(&installation_client).await {
Ok(repos) => repos,
Expand Down
5 changes: 4 additions & 1 deletion src/tests/mocks/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl From<Comment> for GitHubIssueCommentEventPayload {
user: value.author.clone().into(),
labels: vec![],
assignees: vec![],
author_association: "".to_string(),
author_association: "OWNER".to_string(),
locked: false,
comments: 0,
pull_request: Some(GitHubPullRequestLink {
Expand All @@ -97,6 +97,7 @@ impl From<Comment> for GitHubIssueCommentEventPayload {
body_html: Some(value.content.clone()),
user: value.author.into(),
created_at: time,
author_association: "OWNER".to_string(),
},
changes: None,
}
Expand Down Expand Up @@ -135,6 +136,7 @@ struct GitHubIssue {
// Copied from octocrab, since its version if #[non_exhaustive]
#[derive(Serialize)]
pub(super) struct GitHubComment {
author_association: String,
id: CommentId,
node_id: String,
url: Url,
Expand All @@ -160,6 +162,7 @@ impl From<Comment> for GitHubComment {
body_html: Some(value.content.clone()),
user: value.author.into(),
created_at: time,
author_association: "OWNER".to_string(),
}
}
}
Expand Down

0 comments on commit 84d9724

Please sign in to comment.