Skip to content

Commit

Permalink
Merge pull request #3 from id/0508-sync-qzhuyan
Browse files Browse the repository at this point in the history
sync qzhuyan
  • Loading branch information
id committed May 10, 2024
2 parents 02daa4e + 6967ffe commit cd86080
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Other available GitHub Actions Environment Variables are available [here](https:

## Optional settings

The pluging also support the `coveralls_service_pull_request` and `coveralls_parallel` settings.
The plugin also support the `coveralls_service_pull_request` and `coveralls_parallel` settings.
See the Coveralls documentation for the meaning of those.

## Author
Expand Down
2 changes: 1 addition & 1 deletion src/coveralls.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
, {vsn, git}
, {licenses, ["BSD"]}
, {modules, []}
, {registred, []}
, {registered, []}
, {applications,[kernel, stdlib]}
, {env, [{providers, [rebar3_coveralls]}]}
, {maintainers, ["Markus Ekholm"]}
Expand Down
6 changes: 4 additions & 2 deletions src/coveralls.erl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
%% representation suitable to post to coveralls.
%%
%% Note that this function will crash if the modules mentioned in
%% any of the `Filenames' are not availabe on the node.
%% any of the `Filenames' are not available on the node.
%% @end
-spec convert_file(string() | [string()], map()) ->
string().
Expand Down Expand Up @@ -110,9 +110,11 @@ send(Json, #s{poster=Poster, poster_init=Init}) ->
Type = "multipart/form-data; boundary=" ++ Boundary,
Body = to_body(Json, Boundary),
R = Poster(post, {?COVERALLS_URL, [], Type, Body}, [], []),
io:format("coveralls returns: ~p~n", [R]),
{ok, {{_, ReturnCode, _}, _, Message}} = R,
case ReturnCode of
200 -> ok;
200 ->
ok;
ErrCode -> throw({error, {ErrCode, Message}})
end.

Expand Down
3 changes: 3 additions & 0 deletions src/rebar3_coveralls.erl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ do_coveralls(ConvertAndSend, Get, GetLocal, MaybeSkip, Task) ->
Opts = [{coveralls_repo_token, repo_token, string},
{coveralls_service_pull_request, service_pull_request, string},
{coveralls_commit_sha, commit_sha, string},
{coveralls_service_branch, service_branch, string},
{coveralls_service_number, service_number, string},
{coveralls_service_job_number, service_job_number, string},
{coveralls_flag_name, flag_name, string},
{coveralls_parallel, parallel, boolean}],
Report =
lists:foldl(fun({Cfg, Key, Conv}, R) ->
Expand Down

0 comments on commit cd86080

Please sign in to comment.