{"action":"opened","issue":{"url":"https://api.github.com/repos/octokit/octokit.net/issues/1453","repository_url":"https://api.github.com/repos/octokit/octokit.net","labels_url":"https://api.github.com/repos/octokit/octokit.net/issues/1453/labels{/name}","comments_url":"https://api.github.com/repos/octokit/octokit.net/issues/1453/comments","events_url":"https://api.github.com/repos/octokit/octokit.net/issues/1453/events","html_url":"https://github.com/octokit/octokit.net/issues/1453","id":174341825,"number":1453,"title":"Problems paging and querying milestones","user":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-31T18:16:29Z","updated_at":"2016-08-31T18:16:29Z","closed_at":null,"body":"I'm working on a simple app that will query all bugs for a given milestone using Octokit.  The target repo is initially [dotnet/roslyn](https://github.com/dotnet/roslyn) which has a very high number of issues, even when sorted by milestone.  As such I'm trying to use pagination in the API to get the issues in chunks and possibly break up the work.  \r\n\r\nI've looked through the available docs and dug through the code a bit but I can't seem to get a pagination working here.  The basic code I'm running is the follownig:\r\n\r\n``` csharp\r\nvar client = CreatGitHubClient();  // GitHubClient with authentication token\r\nvar request = new RepositoryIssueRequest()\r\n{\r\n    Milestone = \"15\";\r\n};\r\n\r\nvar options = new ApiOptions()\r\n{\r\n    PageCount = 1,\r\n    StartPage = 0,\r\n    PageSize = 50\r\n};\r\n\r\nvar issues = client.Issue;\r\nvar pageIssues = await issues.GetAllForRepository(repo.Id, request, options);\r\n```\r\n\r\nGiven I'm asking for max 50 issues I would expect this to return fairly quickly.  Yet after several minutes it hasn't returned and I can see the GC churning at a pretty good rate.  Seems like it's trying to process all issues here (800+ open issues) vs. filtering on the options. \r\n\r\nHopefully I'm just making a simple mistake here that's easy enough to fix.  Would appreciate help in figuring out what that mistake is :smile:"}}
{"actor":{"display_login":"jaredpar"}}