Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing is Fetched when calling repo.listNotifications(); #181

Closed
mohamed-ennahdi opened this issue Apr 24, 2015 · 5 comments
Closed

Nothing is Fetched when calling repo.listNotifications(); #181

mohamed-ennahdi opened this issue Apr 24, 2015 · 5 comments

Comments

@mohamed-ennahdi
Copy link

Hello,

I try to fetch notifications of a specific repository, but nothing is retrieved (See code below).

What am I missing ?

GHRepository repo = gh.getUser("blueimp").getRepository("jQuery-File-Upload");
System.out.println("Start");
for (GHThread t : repo.listNotifications().nonBlocking(true)) {
System.out.println(t.getReason());
}
System.out.println("Finish");

Thank you,
Mohamed Ennahdi El Idrissi

@mohamed-ennahdi
Copy link
Author

Well, I managed to make it work by using anonymous connection, but this returned an exception.

Is there any valid URL of a public repository where I can see notifications?

image

@KostyaSha
Copy link
Contributor

Please post url in text format

@KostyaSha
Copy link
Contributor

Thanks, i will try reproduce when i will have free time or maybe author will check this faster.

@mohamed-ennahdi
Copy link
Author

I solved the problem. All I needed is to fetch notifications of a user.

So, all I had to do was to specify false for "participating" and true for "read".

gh.listNotifications().nonBlocking(true).participating(false).read(true); // where gh is an authenticated object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants