github-api icon indicating copy to clipboard operation
github-api copied to clipboard

Get fast issue/pull number from notifications

Open rnveach opened this issue 8 years ago • 0 comments

The only way to get the issue/pull number from notifications is like below:

		GitHub github = GitHub.connect();

		GHNotificationStream stream = github.listNotifications();

		for (GHThread t : stream.nonBlocking(true).participating(false).read(true)) {
			System.out.println((t.getBoundIssue() != null ? t.getBoundIssue().getNumber() : ""));
		}

The problem with this is getBoundIssue makes another service call just to get all the information on the issue. I just want the issue number for quick display which is already stored in the subject.url but I don't there is no public method to access it. I think it would be great if there was a simple method like getIssueNumber and getPullNumber.

rnveach avatar Mar 01 '17 16:03 rnveach