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

Pass commit id as URL #756

Closed
koppor opened this issue Jul 11, 2024 · 2 comments
Closed

Pass commit id as URL #756

koppor opened this issue Jul 11, 2024 · 2 comments

Comments

@koppor
Copy link

koppor commented Jul 11, 2024

docker run --rm -p 6789:6789  -v c:\users\koppor\rmc:/diff tsantalis/refactoringminer diff --url https://github.com/JabRef/jabref/pull/11479/commits/5dbc4a3db88c2517c5c5d556405241ac26f06077

results in

Exception in thread "main" java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "11479/commits/5dbc4a3db88c2517c5c5d556405241ac26f06077"
        at gui.webdiff.WebDiffRunner.execute(WebDiffRunner.java:74)
        at org.refactoringminer.RefactoringMiner.main(RefactoringMiner.java:49)
Caused by: java.lang.NumberFormatException: For input string: "11479/commits/5dbc4a3db88c2517c5c5d556405241ac26f06077"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
        at java.base/java.lang.Integer.parseInt(Integer.java:668)
        at java.base/java.lang.Integer.parseInt(Integer.java:786)
        at org.refactoringminer.astDiff.utils.URLHelper.getPullRequestID(URLHelper.java:58)
        at gui.webdiff.WebDiffRunner$RunMode.getProjectASTDIFF(WebDiffRunner.java:116)
        at gui.webdiff.WebDiffRunner.execute(WebDiffRunner.java:67)
        ... 1 more

Passing https://github.com/JabRef/jabref/pull/11476 works fine though.

@tsantalis
Copy link
Owner

@pouryafard75
We need to improve our url utils to handle PR commits, like
https://github.com/JabRef/jabref/pull/11479/commits/5dbc4a3db88c2517c5c5d556405241ac26f06077

@koppor
For the time being, you can pass the commit url as
https://github.com/JabRef/jabref/commit/5dbc4a3db88c2517c5c5d556405241ac26f06077

tsantalis added a commit that referenced this issue Jul 12, 2024
@tsantalis
Copy link
Owner

@koppor
The issue has been fixed. It will be possible to pass PR commit URLs from now on.

tsantalis added a commit that referenced this issue Jul 12, 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

No branches or pull requests

2 participants