Organization project card history through API?

I want to get the history of when issues were added and removed from projects.  On the issue events view at /repos/:org/:repo/issues/:issue/events, with the inertia-preview media type, I can get added_to_project events for repository projects.  But I also want to know if this issue was added or removed from organization projects.

Is there any way to do this?

Hi @ghjm,

Thanks for reaching out, you can use the inertia-preview media type in combination with a webhook that triggers on Project Card Events.

I hope this helps!

Thanks, @andreagriffiths11. If I understand correctly, you’re saying that project card events on organization cards should show up as web hook events. That doesn’t quite solve my problem because I want to look at project histories, not just current activity. Do you know if there’s a way to get past history of these card events?

Thanks for the clarification @ghjm, AFAIK the API now provides project card details in project-related issue events, per our docs: 

project_card field is now included in the issue events and timeline REST API v3 responses for the following event types:

  • added_to_project
  • moved_columns_in_project
  • removed_from_project
  • converted_note_to_issue

To access this new API during the preview period, you must provide a custom media type in the Accept header:

   application/vnd.github.starfox-preview

Yes, that is all correct from what I seeing @andreagriffiths11.  However, in the issue events and timeline, I only see these events for cards associated with repo projects.  I do not see any project card events in the timeline related to organization projects, even for issues where they ought to be there (i.e., issues that have been added/removed from these projects).

Thanks,

-Graham

By default, organization members have write access to their organization’s project boards unless organization owners or project board admins set different permissions for specific project boards. Assuming access is not an issue, another contingent will be  If an organization-owned project board includes issues or pull requests from a repository that you don’t have permission to view, the card will be redacted.