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

Change Jenkiexs.Builds.details/2 to be coherent with ! convention #39

Open
GPrimola opened this issue Oct 28, 2020 · 0 comments
Open

Change Jenkiexs.Builds.details/2 to be coherent with ! convention #39

GPrimola opened this issue Oct 28, 2020 · 0 comments

Comments

@GPrimola
Copy link
Owner

I noticed something in Jenkiexs.Buids.details/2 but didn't want to change in the abovementioned PR because it's not its purpose.

Jenkiexs.Builds.details/2 uses Client.get!/3 as follows:

  def details(job_name, build_number) do
    case Client.get!("/job/#{job_name}/#{build_number}/api/json") do
      %{status_code: 200, body: body} ->
        build = new(job_name, body)
        {:ok, build}

      %{status_code: status, body: body} ->
        {:error, "Got status #{status} with body #{inspect(body)}."}
    end
  end

What do you think about changing that request to Client.get/3 and then creating a Jenkiexs.Builds.details!/2 just to keep the API consistent?

Originally posted by @dflima in #18 (comment)

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

No branches or pull requests

1 participant