Skip to content

Commit

Permalink
fix: missing branch param on base module
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed May 13, 2022
1 parent f5cf9a3 commit 2aa61f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: git-repository
version: 1.1.0
version: 1.1.1

development_dependencies:
ameba:
Expand Down
4 changes: 2 additions & 2 deletions src/git-repository.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module GitRepository
VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify.downcase }}
{% end %}

def self.new(repository : String | URI, username : String? = nil, password : String? = nil) : GitRepository::Interface
def self.new(repository : String | URI, username : String? = nil, password : String? = nil, branch : String? = nil) : GitRepository::Interface
uri = repository.is_a?(URI) ? repository : URI.parse(repository)
downcased_host = uri.host.try &.downcase

Expand All @@ -16,7 +16,7 @@ module GitRepository
# case "www.github.com", "github.com"
# once we add specific providers
else
GitRepository::Generic.new(uri.to_s, username, password)
GitRepository::Generic.new(uri.to_s, username, password, branch.presence)
end
end
end
Expand Down

0 comments on commit 2aa61f7

Please sign in to comment.