Skip to content

Commit ad98256

Browse files
authored
Merge pull request #106 from yknx4/fix/docker-build-2
fix: add missing file to dockerfile
2 parents 78ea518 + d68055f commit ad98256

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ RUN mix phx.digest
3030
# compile and build release
3131
COPY lib lib
3232
COPY web web
33+
COPY openapi.json openapi.json
3334
# uncomment COPY if rel/ exists
3435
# COPY rel rel
3536
RUN mix do compile, release

lib/opencov/plug/multipart_job.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ defmodule Librecov.Plug.MultipartJob do
2828
handle(content_type, conn)
2929
end
3030

31-
def handle("application/json", %{params: %{"json" => json}} = conn) when is_binary(json) do
31+
def handle("multipart/form-data", %{params: %{"json_file" => file}} = conn) do
3232
conn
33-
|> put_parsed_job(json)
33+
|> put_parsed_job(file |> read_file())
3434
end
3535

36-
def handle("multipart/form-data", %{params: %{"json_file" => file}} = conn) do
36+
def handle(_, %{params: %{"json" => json}} = conn) when is_binary(json) do
3737
conn
38-
|> put_parsed_job(file |> read_file())
38+
|> put_parsed_job(json)
3939
end
4040

4141
def handle(content_type, conn) do

lib/opencov/templates/comment_template.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ defmodule Librecov.Templates.CommentTemplate do
1919
branch: branch
2020
} = build
2121
) do
22-
build = Repo.preload(build, :jobs)
22+
build = Librecov.Repo.preload(build, :jobs)
2323
real_previous_coverage = project_coverage || previous_coverage || 0.0
2424
cov_dif = coverage_diff(coverage, real_previous_coverage)
2525

0 commit comments

Comments
 (0)