Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

Not seeing "assigned" and "unassigned" IssuesEvents

Solved! Go to Solution.

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.)

2 Replies
Solution
Community Manager
Message 2 of 3

Re: Not seeing "assigned" and "unassigned" IssuesEvents

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....

 

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

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 2
Message 3 of 3

Re: Not seeing "assigned" and "unassigned" IssuesEvents

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.