{"action":"created","issue":{"url":"https://api.github.com/repos/openSUSE/gitarro/issues/47","repository_url":"https://api.github.com/repos/openSUSE/gitarro","labels_url":"https://api.github.com/repos/openSUSE/gitarro/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/openSUSE/gitarro/issues/47/comments","events_url":"https://api.github.com/repos/openSUSE/gitarro/issues/47/events","html_url":"https://github.com/openSUSE/gitarro/pull/47","id":261373870,"number":47,"title":"Improve PR search when gitarro is running with cron-like tools to avoid exceeding GitHub API limits","user":{"login":"juliogonzalez","id":4226070,"avatar_url":"https://avatars1.githubusercontent.com/u/4226070?v=4","gravatar_id":"","url":"https://api.github.com/users/juliogonzalez","html_url":"https://github.com/juliogonzalez","followers_url":"https://api.github.com/users/juliogonzalez/followers","following_url":"https://api.github.com/users/juliogonzalez/following{/other_user}","gists_url":"https://api.github.com/users/juliogonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/juliogonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliogonzalez/subscriptions","organizations_url":"https://api.github.com/users/juliogonzalez/orgs","repos_url":"https://api.github.com/users/juliogonzalez/repos","events_url":"https://api.github.com/users/juliogonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/juliogonzalez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-09-28T16:01:46Z","updated_at":"2017-10-03T09:50:16Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/openSUSE/gitarro/pulls/47","html_url":"https://github.com/openSUSE/gitarro/pull/47","diff_url":"https://github.com/openSUSE/gitarro/pull/47.diff","patch_url":"https://github.com/openSUSE/gitarro/pull/47.patch"},"body":"Since some people (including us) is using a cron-like pull instead of GitHub Webhooks, knowing which PRs were updated since the last time the cron ran a pull can avoid some request to the API (otherwise it is easy to hit the request limit easily -as we do now- and get failed tests just because we can't contact GitHub).\r\n\r\nNew parameter is ```--changed_since <SECONDS>```\r\n\r\nIf present it will consider only PRs with changes newer than X seconds.\r\n\r\nSo for example, if we look for PRs requiring tests each 5 minutes, and we set here ```--changed_since=60``` it will ignore open PRs unless there were changes in the last 60 seconss.\r\n\r\nA change is considered a commit or a comment, and it will update the field ```updated_at``` at GitHub API (if the PR was just opened then ```updated_at``` has the same value as ```created_at```.\r\n\r\nIf the parameter is NOT present, gitarro will work as usual.\r\n\r\nIf ```SECONDS``` is 0 then it will ignore all PRs. And negative values is the same as not using the parameters. These last two options are useful for testing, including unit tests."},"comment":{"url":"https://api.github.com/repos/openSUSE/gitarro/issues/comments/333793933","html_url":"https://github.com/openSUSE/gitarro/pull/47#issuecomment-333793933","issue_url":"https://api.github.com/repos/openSUSE/gitarro/issues/47","id":333793933,"user":{"login":"MalloZup","id":10886597,"avatar_url":"https://avatars3.githubusercontent.com/u/10886597?v=4","gravatar_id":"","url":"https://api.github.com/users/MalloZup","html_url":"https://github.com/MalloZup","followers_url":"https://api.github.com/users/MalloZup/followers","following_url":"https://api.github.com/users/MalloZup/following{/other_user}","gists_url":"https://api.github.com/users/MalloZup/gists{/gist_id}","starred_url":"https://api.github.com/users/MalloZup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MalloZup/subscriptions","organizations_url":"https://api.github.com/users/MalloZup/orgs","repos_url":"https://api.github.com/users/MalloZup/repos","events_url":"https://api.github.com/users/MalloZup/events{/privacy}","received_events_url":"https://api.github.com/users/MalloZup/received_events","type":"User","site_admin":false},"created_at":"2017-10-03T09:50:16Z","updated_at":"2017-10-03T09:50:16Z","author_association":"COLLABORATOR","body":"@juliogonzalez https://github.com/openSUSE/gitarro/issues/66"}}
{"actor":{"display_login":"MalloZup"}}