feat: implement user social graph (followers, following, stars, watches) #8
Reference in New Issue
Block a user
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?
Context
The social graph of a Gitea instance — who follows whom, which repos are starred or
watched — is useful for discovery, notifications, and building dashboards. These
endpoints expose the full social layer of the authenticated user and any public user.
Endpoints to implement
/user/followerslist_my_followers/user/followinglist_my_following/user/following/{username}follow_user/user/following/{username}unfollow_user/users/{username}/followerslist_user_followers/users/{username}/followinglist_user_following/user/starredlist_my_starred_repos/user/starred/{owner}/{repo}star_repo/user/starred/{owner}/{repo}unstar_repo/user/subscriptionslist_my_watched_repos/repos/{owner}/{repo}/subscriptionwatch_repo/repos/{owner}/{repo}/subscriptionunwatch_repoAcceptance Criteria
list_*tools supportlimitandpagepagination paramsfollow_user/unfollow_userreturn{"success": true}on 204star_repo/unstar_reporeturn{"success": true}on 204watch_repo/unwatch_reporeturn{"success": true}on 204list_user_followers,list_user_following) work without auth for public usersTechnical Notes
PUT /user/following/{username}andPUT /user/starred/{owner}/{repo}have no request bodyPUT /repos/{owner}/{repo}/subscriptionbody:{"subscribed": true, "ignored": false}