diff --git a/Project.toml b/Project.toml index 31e36c6..4c6cfd8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GitForge" uuid = "8f6bce27-0656-5410-875b-07a5572985df" authors = ["Chris de Graaf "] -version = "0.2.7" +version = "0.2.8" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/src/forges/GitLab/projects.jl b/src/forges/GitLab/projects.jl index fe09e57..7562fd7 100644 --- a/src/forges/GitLab/projects.jl +++ b/src/forges/GitLab/projects.jl @@ -138,4 +138,6 @@ into(::GitLabAPI, ::typeof(is_collaborator)) = Bool endpoint(::GitLabAPI, ::typeof(get_file_contents), id::Integer, path::AStr) = Endpoint(:GET, "/projects/$id/repository/files/$path"; query=Dict(:ref => "master")) +endpoint(::GitLabAPI, ::typeof(get_file_contents), owner::AStr, repo::AStr, path::AStr) = + Endpoint(:GET, "/projects/$(encode(owner, repo))/repository/files/$path"; query=Dict(:ref => "master")) into(::GitLabAPI, ::typeof(get_file_contents)) = FileContents