{"action":"opened","issue":{"url":"https://api.github.com/repos/RobotsAndPencils/marvin/issues/25","labels_url":"https://api.github.com/repos/RobotsAndPencils/marvin/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/RobotsAndPencils/marvin/issues/25/comments","events_url":"https://api.github.com/repos/RobotsAndPencils/marvin/issues/25/events","html_url":"https://github.com/RobotsAndPencils/marvin/issues/25","id":127549650,"number":25,"title":"BUG - Incorrectly reporting commits as being from master","user":{"login":"aerickson14","id":1420670,"avatar_url":"https://avatars.githubusercontent.com/u/1420670?v=3","gravatar_id":"","url":"https://api.github.com/users/aerickson14","html_url":"https://github.com/aerickson14","followers_url":"https://api.github.com/users/aerickson14/followers","following_url":"https://api.github.com/users/aerickson14/following{/other_user}","gists_url":"https://api.github.com/users/aerickson14/gists{/gist_id}","starred_url":"https://api.github.com/users/aerickson14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerickson14/subscriptions","organizations_url":"https://api.github.com/users/aerickson14/orgs","repos_url":"https://api.github.com/users/aerickson14/repos","events_url":"https://api.github.com/users/aerickson14/events{/privacy}","received_events_url":"https://api.github.com/users/aerickson14/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RobotsAndPencils/marvin/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-19T22:03:58Z","updated_at":"2016-01-19T22:03:58Z","closed_at":null,"body":"When running the `/commitstomaster` command the output will, in some cases, report commits as being from master when in fact they are part of a valid Pull Request. \n\nIf there is a Pull Request that was created exactly 7 days ago from the time the command was run but was run at an *earlier* time of day than the Pull Request was created then:\n- Commits that are part of the PR could possibly be included in the list of candidate commits.\n\nThe current implementation of `/commitstomaster` does the following:\n- Grabs a list of *all* `commits` in a repo (supposedly) where the commit date is within a 7 day time frame from the current time\n- Grabs a list of `allPRCommits` that were created within the 7 day time frame.\n- compares the list of `commits` to `allPRCommits` and returns anything leftover in the `allCommits` that was not part of `repoCommits`.\n\nPossible problems:\n- Investigate if `loadCommitsForRepo` returns commits that are *greater than* its `days` parameter\n- Investigate if `loadCommitsFromAllRepoPRs` *does not include* commits that are within the `days` parameter."}}