github

Is there a way to see the date that a github repository switched from public to private or vice versa


I was hoping there was a log somewhere but I don't see one. The point is to understand what exactly was in the repository when it was public.


Solution

  • 2021: You do have a "public event" (When a private repository is made public)

    But you do not have the opposite (When a public repository is made private).
    Which means you will not see it through the GitHub Activity API.

    That means such an event (switch to private) is likely not visible.
    The switch to public should be listed with GET /events.

    But:

    Only events created within the past 90 days will be included in timelines.
    Events older than 90 days will not be included.


    Q1 2025: this will be limited to 30 days.