Skip to content

Commit 84d9724

Browse files
authored
Merge pull request #174 from MarcoIeni/chore-update-octocrab-to-version-0.42
chore: update octocrab to version 0.42
2 parents a223442 + 7e759f1 commit 84d9724

File tree

4 files changed

+44
-79
lines changed

4 files changed

+44
-79
lines changed

Cargo.lock

Lines changed: 36 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ serde_json = "1.0"
2424
toml = "0.8"
2525

2626
# GitHub
27-
octocrab = "0.35.0"
27+
octocrab = "0.42.0"
2828

2929
# Async
3030
futures = "0.3"

src/github/api/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ pub async fn load_repositories(
5757

5858
let mut repositories = HashMap::default();
5959
for installation in installations {
60-
let installation_client = client.installation(installation.id);
60+
let installation_client = client
61+
.installation(installation.id)
62+
.context("failed to install client")?;
6163

6264
let repos = match load_installation_repos(&installation_client).await {
6365
Ok(repos) => repos,

src/tests/mocks/comment.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl From<Comment> for GitHubIssueCommentEventPayload {
7575
user: value.author.clone().into(),
7676
labels: vec![],
7777
assignees: vec![],
78-
author_association: "".to_string(),
78+
author_association: "OWNER".to_string(),
7979
locked: false,
8080
comments: 0,
8181
pull_request: Some(GitHubPullRequestLink {
@@ -97,6 +97,7 @@ impl From<Comment> for GitHubIssueCommentEventPayload {
9797
body_html: Some(value.content.clone()),
9898
user: value.author.into(),
9999
created_at: time,
100+
author_association: "OWNER".to_string(),
100101
},
101102
changes: None,
102103
}
@@ -135,6 +136,7 @@ struct GitHubIssue {
135136
// Copied from octocrab, since its version if #[non_exhaustive]
136137
#[derive(Serialize)]
137138
pub(super) struct GitHubComment {
139+
author_association: String,
138140
id: CommentId,
139141
node_id: String,
140142
url: Url,
@@ -160,6 +162,7 @@ impl From<Comment> for GitHubComment {
160162
body_html: Some(value.content.clone()),
161163
user: value.author.into(),
162164
created_at: time,
165+
author_association: "OWNER".to_string(),
163166
}
164167
}
165168
}

0 commit comments

Comments
 (0)