Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions assets/js/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,9 @@ class LicenseSuggestion

# Try to extract the repository full name from the user input
parseUserInput: (userInput) ->
repository = /https?:\/\/github\.com\/(.*?)\/(.+)(\.git)?$/.exec userInput
repository = /https?:\/\/github\.com\/([^\/]+)\/([^\/\?#]+)/.exec userInput
[_, username, project] = repository
project = project
.split /\/|\.git/
.filter (str) -> str
.slice 0, 1
.join ""
return username + '/' + project
return username + '/' + project.replace /(\.git)$/, ''

# Displays an indicator and tooltips to the user about the current status
setStatus: (status="", message="") =>
Expand Down
Loading