Open spenserblack opened 4 years ago
Hello, I am trying to add user
to area issues
. But when I try to test the result against with the return from API call via http, I find the results are not aligned.
I use the sample code from README.md
and run cargo run
. It returns # of merged PRs: 1339
for total_count
, while the expected API should be (https://api.github.com/search/issues?per_page=1&page=1&q=repo:rust-lang/rust+is:pr+is:merged) has total_count
value of 24961
.
Is it the expected behavior? I cannot figure out the cause of differences.
My code to run:
use github_stats::{Query, Search};
fn main() {
// Gets latest merged PR
let search = Search::new(
"issues",
&Query::new().repo("rust-lang", "rust").is("pr").is("merged"),
)
.per_page(1)
.search();
match search {
Ok(results) => println!("# of merged PRs: {}", results.total_count()),
Err(_e) => eprintln!(":("),
}
}
Thanks for bringing that up, @pancreaflame! I've created #21 for this bug. In the future, in situations like this, could you open up a new issue? While what you found is definitely important, I don't think it's related to an issue tracking enhancements.
Oh Yes! I didn't realize it was a bug. What I was thinking is: Is it related to I've logged in to GitHub account or not?
Now I know more about the testing strategy and how to do better issue tracking. Thank you! :smile:
@spenserblack I'll take these: author
, assignee
! 🎃
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed for being stale.
query.rs
needs to support more query options. If you would like to work on this issue, please tell me which of the tasks below you would like to work on. You can check out the PRs linked to the completed tasks to get an example of what to do. Happy hacking! :jack_o_lantern:is
type
in
user
#20org
repo
state
author
#22assignee
#23mentions
team
commenter
involves
label
#8milestone
project
status
SHA
(this would probably be handled by adding a generic search parameter)head
base
language
#15comments
interactions
reactions
review
reviewed-by
review-requested
team-review-requested
created
updated
closed
merged
archived
no
#9prefix:
)Helpful Links