Skip to content

Commit

Permalink
wip(search): Fix issues with SearchIssuesResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
proudmuslim-dev committed Jul 9, 2022
1 parent 1f7d14a commit f55e3c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions github-rest/src/builders/search.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
builders::{builder, builder_nested_setters, Builder},
methods::{SearchIssuesBody, SearchRepositoriesBody, SearchRepositoriesResponse},
methods::{SearchIssuesBody, SearchIssuesResponse, SearchRepositoriesBody, SearchRepositoriesResponse},
GithubRestError, Requester,
};
use async_trait::async_trait;
Expand Down Expand Up @@ -48,7 +48,7 @@ builder_nested_setters!(SearchIssuesBuilder {

#[async_trait]
impl Builder for SearchIssuesBuilder {
type Response = SearchRepositoriesResponse;
type Response = SearchIssuesResponse;

async fn execute<T>(mut self, client: &T) -> Result<Self::Response, GithubRestError>
where
Expand Down Expand Up @@ -166,7 +166,8 @@ mod tests {

let res = SearchIssuesBuilder::new()
.query("[feature request]")
.comments(1..50)
// TODO: Figure out why uncommenting this breaks reactions
//.comments(1..50)
.reactions(50..usize::MAX)
.execute(&requester)
.await?;
Expand Down
2 changes: 1 addition & 1 deletion github-rest/src/methods/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl SearchRepositoriesBody {
#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq)]
pub struct SearchIssuesResponse {
pub total_count: usize,
pub incomplete_result: bool,
pub incomplete_results: bool,
pub items: Vec<IssueSearchResultItem>,
}

Expand Down

0 comments on commit f55e3c3

Please sign in to comment.