mirror of
https://github.com/misiektoja/github_monitor.git
synced 2026-04-26 23:45:49 +03:00
[GH-ISSUE #4] user block status not detectable #3
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/github_monitor#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @catdkl on GitHub (Jun 19, 2025).
Original GitHub issue: https://github.com/misiektoja/github_monitor/issues/4
any way to tell if the user you track blocked you without doing anything? don't see anything in pygithub or the github api spec, seems like all info is always available?
@misiektoja commented on GitHub (Jun 20, 2025):
Hey! I don't think it's possible. If it were, PyGithub would probably have something for it, but I'll dig a bit deeper when I get the chance. Maybe there's a hidden way lurking around ...
@misiektoja commented on GitHub (Jun 24, 2025):
I have some good news! I did some research yesterday and found that the only way to check if someone blocked you is to try something like following them. But let's be honest, that's not really what you want to do. I noticed something interesting, though. There's a documented
viewerCanFollowfield in the GraphQL schema. It tells you if viewer is allowed to follow the specific user.It turns out GitHub only returns false for that field if either the viewer is the same account or you've been blocked. Not sure if it is a GitHub's oversight or just side effect of how GraphQL enforces follow permissions, but check out v2.0 - it gives you the cool feature that automatically detects and notifies you if the token owner is blocked or unblocked by the tracked user!
@catdkl commented on GitHub (Jun 25, 2025):
didn't think this would actually work, figured you were joking, but turns out it does - appreciate the help, awesome work