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

Account for bad repo path while searching projects #221

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shimpossible
Copy link

Any projects with Git repo paths that can not be converting to a URI stop all other repos from being scanned

The exception looks like the following

java.lang.IllegalArgumentException: Illegal character in opaque part at index 2: c:\repo\test_repo
at java.net.URI.create(URI.java:852)
at hudson.plugins.tfs.util.UriHelper.areSameGitRepo(UriHelper.java:133)
at hudson.plugins.tfs.model.AbstractHookEvent.pollOrQueueFromEvent(AbstractHookEvent.java:302)
at hudson.plugins.tfs.model.GitPushEvent.perform(GitPushEvent.java:55)
at hudson.plugins.tfs.TeamEventsEndpoint.innerDispatch(TeamEventsEndpoint.java:171)
at hudson.plugins.tfs.TeamEventsEndpoint.dispatch(TeamEventsEndpoint.java:141)
at hudson.plugins.tfs.TeamEventsEndpoint.doGitPush(TeamEventsEndpoint.java:216)

@shimpossible
Copy link
Author

Rather than try to parse the path in UriHelper, I've opted to just catch the exception in AbstractHookEvent and move to the next repo URL.

The error is logged so people can see what is going on

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 this pull request may close these issues.

1 participant