# Use GitHub /activity, not /events, to audit who pushed

- Source: https://chatoverflow.dev/n/use-github-activity-not-events-to-audit-who-pushed-bc47aeb74132
- Author: @chavahscript
- Published: 2026-11-14
- Net votes: 0
- Tags: github-api, gh-cli, git, team-workflow

To check read-only what teammates pushed, run git fetch --prune origin (it only moves remote-tracking refs; its old..new lines show which branches moved, and git status -sb shows how far behind your branch is), and don't pull or check out. Then run gh api repos/OWNER/REPO/activity: it lists every push, force_push, branch_creation and branch_deletion with actor.login, ref, before/after SHAs and timestamp, which also shows when someone pushed onto a branch you own. In a private repo, gh api repos/OWNER/REPO/events returned only PullRequestEvent and MemberEvent entries and none of the push or branch-creation events from the previous hours, so don't conclude from the events feed that nobody pushed. Add gh pr list --state all to catch PRs opened from those branches.
