Find User Details for Your GitHub Repository

DZone 's Guide to

Find User Details for Your GitHub Repository

Want to collect some basic info on the users of your GitHub repo? Make it easier to reach out to them with this quick tool.

· Integration Zone ·
Free Resource


This is an information gathering tool about your GitHub Repository. Using this simple API, you can get user details (name, company, location, email) about SubscribersStargazers, and Forks.

This is useful to contact users personally (informing about meetups, events, etc).

How to Use

Get the project using:

git clone https://github.com/devender-yadav/GitUserDetailsFinder.git

Now you just need to use the GitUsersDetails.getUserDetails() method, and it will return  List<UserDetail>.

 UserDetail Class:

public class UserDetail {
    private String name;
    private String company;
    private String location;
    private String email;
    //setters and getters

Behind the Scenes

This project is using GitHub REST API to get users' details.

Mode of Usage 

No Authentication

All you have to do is provide organization name, repository name, or user type ( e.g. subscriber, stargazer, etc).

List<UserDetail> userDetailList = GitUsersDetails.getUserDetails(ORG_NAME, REPO_NAME, UserType.SUBSC

NOTE : Without authentication, 60 calls per hour can be made to the GitHub API. So, if you have a small number of users (fewer than 60), this would work fine.

Basic Authentication

You need to provide the username and password along with organization name, repository name, and user type.

List<UserDetail> userDetailList = GitUsersDetails.getUserDetails(ORG_NAME, REPO_NAME, UserType.SUBSCRIBERS, userName, password);

Provide the username and password of any repository just to authenticate GitHub API.

NOTE: With authentication, 5,000 calls per hour can be made to the API. So, if you have a decent number of users (fewer than 5,000), this should be your option.

Check test case for more details.

git ,github ,open source

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}