Not seeing "assigned" and "unassigned" IssuesEvents

I’m using PyGithub to fetch events from one of our clients’ GitHub repos. Specifically, I’m calling get_events on the repository object, to list recent issue events for the repo.

This is working nicely, and it includes the IssuesEvents that I expect to see, with opened, closed and reopened action types. But I’m not seeing ‘action’: ‘assigned’ or ‘action’: ‘unassigned’ IssuesEvents, even though I’ve recently changed Assignees for issues in GitHub.

I’m changing Assignees by going to an issue on the GitHub site, and clicking the gear icon alongside the Assignees. I’ve tried removing all Assignees, adding additional ones, etc. But IssuesEvents don’t seem to be being generated.

Any ideas for what I might be doing wrong?

(P.S: Please excuse the lack of formatting in this post. This forum seems to strip ‘code’ tags from posts, which I think is pretty silly.)

Hi @mscheper,

Thank you for being here! Looking at PyGitHub’s documentation, the get_events call goes to the repo events list. Could you try this call instead: https://pygithub.readthedocs.io/en/latest/github_objects/Repository.html?highlight=get_events#github.Repository.Repository.get_issues_events.

That should work, it might otherwise be a limitation on the API side, although the documentation for the API says these events are listed, they are not available in the events endpoint PyGithub is reading from. You should be able to access these events via webhooks. I’ll ask for a sanity check on this from the API team and post any updates here.

Best,

Andrea

1 Like

G’day @andreagriffiths11,

Yep, using get_issues_events, as you suggested, worked. I got IssueEvents back instead of Events, which messes up my elegance a bit 😉, but it looks like all the data I need is there. Thanks for the answer, and for the welcome.