GogsHelpers (gogs v0.2.0)

Link to this section Summary

Functions

api_base_url/0 returns the Gogs Server REST API url for API requests.

make_url/2 constructs the URL based on the supplied git url and TCP port. If the port is set it will be a custom Gogs instance.

Link to this section Functions

api_base_url/0 returns the Gogs Server REST API url for API requests.

examples

Examples

iex> GogsHelpers.api_base_url() "https://gogs-server.fly.dev/api/v1/"

Link to this function

make_url(git_url, port \\ 0)

make_url/2 constructs the URL based on the supplied git url and TCP port. If the port is set it will be a custom Gogs instance.

examples

Examples

iex> GogsHelpers.make_url("gogs-server.fly.dev", "10022") "ssh://git@gogs-server.fly.dev:10022/"

iex> GogsHelpers.make_url("github.com") "git@github.com:"