{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/pygit2/issues/822","repository_url":"https://api.github.com/repos/libgit2/pygit2","labels_url":"https://api.github.com/repos/libgit2/pygit2/issues/822/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/pygit2/issues/822/comments","events_url":"https://api.github.com/repos/libgit2/pygit2/issues/822/events","html_url":"https://github.com/libgit2/pygit2/issues/822","id":365887202,"node_id":"MDU6SXNzdWUzNjU4ODcyMDI=","number":822,"title":"repo.descendant_of() always returns True on invalid SHA's","user":{"login":"cjerdonek","id":355822,"node_id":"MDQ6VXNlcjM1NTgyMg==","avatar_url":"https://avatars3.githubusercontent.com/u/355822?v=4","gravatar_id":"","url":"https://api.github.com/users/cjerdonek","html_url":"https://github.com/cjerdonek","followers_url":"https://api.github.com/users/cjerdonek/followers","following_url":"https://api.github.com/users/cjerdonek/following{/other_user}","gists_url":"https://api.github.com/users/cjerdonek/gists{/gist_id}","starred_url":"https://api.github.com/users/cjerdonek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjerdonek/subscriptions","organizations_url":"https://api.github.com/users/cjerdonek/orgs","repos_url":"https://api.github.com/users/cjerdonek/repos","events_url":"https://api.github.com/users/cjerdonek/events{/privacy}","received_events_url":"https://api.github.com/users/cjerdonek/received_events","type":"User","site_admin":false},"labels":[{"id":763120422,"node_id":"MDU6TGFiZWw3NjMxMjA0MjI=","url":"https://api.github.com/repos/libgit2/pygit2/labels/bug","name":"bug","color":"d93f0b","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-02T13:03:07Z","updated_at":"2018-10-06T08:39:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I'm getting that if you pass a 40-character string SHA to `repo.descendant_of()` that doesn't correspond to a commit (for either argument), then the function always returns `True`. I haven't verified, but it looks like it could be because of this line:\r\n\r\nhttps://github.com/libgit2/pygit2/blob/976450a7ca594c25cc3bf10b5fb40070fcfb8265/src/repository.c#L593\r\n\r\nThe `PyBool_FromLong()` converts an error code to `True`. Instead, an error code should result in an exception IMO."},"comment":{"url":"https://api.github.com/repos/libgit2/pygit2/issues/comments/427557068","html_url":"https://github.com/libgit2/pygit2/issues/822#issuecomment-427557068","issue_url":"https://api.github.com/repos/libgit2/pygit2/issues/822","id":427557068,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzU1NzA2OA==","user":{"login":"jdavid","id":596769,"node_id":"MDQ6VXNlcjU5Njc2OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/596769?v=4","gravatar_id":"","url":"https://api.github.com/users/jdavid","html_url":"https://github.com/jdavid","followers_url":"https://api.github.com/users/jdavid/followers","following_url":"https://api.github.com/users/jdavid/following{/other_user}","gists_url":"https://api.github.com/users/jdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/jdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdavid/subscriptions","organizations_url":"https://api.github.com/users/jdavid/orgs","repos_url":"https://api.github.com/users/jdavid/repos","events_url":"https://api.github.com/users/jdavid/events{/privacy}","received_events_url":"https://api.github.com/users/jdavid/received_events","type":"User","site_admin":false},"created_at":"2018-10-06T08:39:00Z","updated_at":"2018-10-06T08:39:00Z","author_association":"MEMBER","body":"Good catch!\r\n\r\nPR maybe? :smile: "}}
{"actor":{"display_login":"jdavid"}}