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

fails on jbangdev/jbang #11

Closed
maxandersen opened this issue Apr 26, 2024 · 4 comments · Fixed by #13
Closed

fails on jbangdev/jbang #11

maxandersen opened this issue Apr 26, 2024 · 4 comments · Fixed by #13

Comments

@maxandersen
Copy link
Contributor

the changed defaults are awesome - much easier to try out!

...which I did on jbang and I got this when running in a clone of https://github.com/jbangdev/jbang:

jbang gcl@koppor/github-contributors-list
[jbang] Resolving dependencies...
[jbang]    com.h2database:h2-mvstore:2.2.224
[jbang]    org.eclipse.jgit:org.eclipse.jgit:6.9.0.202403050737-r
[jbang]    org.kohsuke:github-api:1.321
[jbang]    info.picocli:picocli:4.7.5
[jbang]    one.util:streamex:0.8.2
[jbang]    me.tongfei:progressbar:0.10.1
[jbang]    org.eclipse.collections:eclipse-collections:11.1.0
[jbang]    org.tinylog:tinylog-api:2.7.0
[jbang]    org.tinylog:tinylog-impl:2.7.0
[jbang]    org.tinylog:slf4j-tinylog:2.7.0
[jbang] Dependencies resolved
[jbang] Building jar for gcl.java...
INFO: Opening local git repository .... (call)
INFO: Connecting to jbangdev/jbang... (call)
INFO: Analyzing 1542 days backwards: From 2024-03-13T22:21:52Z to 2019-12-23T13:42:49Z (call)
Analyzing  88% │█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                    │ 1363/1542 (0:00:41 / 0:00:05) PR 1
org.kohsuke.github.GHFileNotFoundException: https://api.github.com/repos/jbangdev/jbang/pulls/1 {"message":"Not Found","documentation_url":"https://docs.github.com/rest/pulls/pulls#get-a-pull-request"}
	at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:735)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:480)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:427)
	at org.kohsuke.github.Requester.fetch(Requester.java:85)
	at org.kohsuke.github.GHRepository.getPullRequest(GHRepository.java:1676)
	at gcl.analyzePullRequest(gcl.java:326)
	at gcl.analyzeCommit(gcl.java:317)
	at gcl.call(gcl.java:253)
	at gcl.call(gcl.java:66)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at gcl.main(gcl.java:164)
Caused by: java.io.FileNotFoundException: https://api.github.com/repos/jbangdev/jbang/pulls/1
	at org.kohsuke.github.GitHubConnectorResponseErrorHandler$1.onError(GitHubConnectorResponseErrorHandler.java:68)
	at org.kohsuke.github.GitHubClient.detectKnownErrors(GitHubClient.java:504)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:464)
	... 16 more
@koppor
Copy link
Owner

koppor commented Apr 26, 2024

Nice find!

That was a merge on a fork from a PR to that fork...

I will just log a warning if a PR is not found - and ignore these for now. Otherwise, I would have to do some "magic" to guess which contributor did what forks and which PRs on that fork.

@koppor
Copy link
Owner

koppor commented Apr 26, 2024

Current output

INFO: Opening local git repository .... (call)
INFO: Connecting to jbangdev/jbang... (call)
INFO: Analyzing 1567 days: From 2019-12-23 to 2024-04-07 (getCommitRangeInformation)
Analyzing  10% │██▋                      │  172/1567 (0:00:20 / 0:02:42) PR 127WARN: Pull request 1 not found. Referenced from commit 21f5a3bde166ca77956774b6041fdab72cee8eef. (analyzePullRequest)
Analyzing  57% │█████████████▊          │  898/1567 (0:04:13 / 0:03:08) PR 1372WARN: Pull request 1380 not found. Referenced from commit 49a907e38cebe01155f1c3b5f399b1c6349c5ef6. (analyzePullRequest)
Analyzing  58% │█████████████▉          │  909/1567 (0:04:14 / 0:03:03) PR 1380WARN: Pull request 1380 not found. Referenced from commit d7c2a77bdff8300d2b9607e89e55717ae1510cbe. (analyzePullRequest)
Analyzing 100% │████████████████████████│ 1567/1567 (0:05:34 / 0:00:00) PR 1765

@koppor
Copy link
Owner

koppor commented Apr 26, 2024

However, someone makes up contributors...

Bruno Borges jbangdev/jbang#26 jbangdev/jbang@5726541

Not sure how the tool thinks this is true?


Update OK, it's commit f0fced15079941b3aa67adbd0272cdb98baa9bf0.

@koppor
Copy link
Owner

koppor commented Apr 26, 2024

Created follow-up issue for a better mapping of existing users - #12

This was referenced Apr 26, 2024
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

Successfully merging a pull request may close this issue.

2 participants