Skip to content

Commit a328289

Browse files
authored
Merge pull request #150 from inaka/harenson.149.fix-issues-left-after-pull-146
[Fix #149] Fix dialyzer and code issues left after pull#146
2 parents 35956a9 + 68c47b6 commit a328289

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ This would create a comment with the text `Hello` for the issue `username/repo#1
105105
API Documentation
106106
=====
107107

108-
There is an automatically generated API documentation page in this project's GitHub page
109-
[here](http://inaka.github.io/erlang-github/).
108+
There is an automatically generated API documentation page [here][api_doc].
110109

111110
Example
112111
=====
@@ -131,3 +130,4 @@ And you can check all of our open-source projects at [inaka.github.io](http://in
131130

132131
[1]: https://developer.github.com/v3/
133132
[pr_review]: https://developer.github.com/v3/pulls/reviews/
133+
[api_doc]: https://hexdocs.pm/egithub/

src/egithub_webhook.erl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
-export_type([req_data/0, message/0, file/0, webhook_target_url/0, review/0]).
3737

3838
-callback handle_pull_request(egithub:credentials(), req_data(), [file()]) ->
39-
{ok, [message()]} | {error, term()}.
39+
{ok, [message()]} | {ok, review()} | {error, term()}.
4040

4141
-callback handle_error({error, term()}, req_data(), [file()]) ->
4242
{error, term(), webhook_target_url()}
@@ -284,8 +284,7 @@ line_comment_exists(Comments, Path, Position, Body) ->
284284
integer(), review() | [message()]) ->
285285
egithub:result().
286286
handle_messages_or_review(Cred, Repo, PR, Messages) ->
287-
{ok, ReviewStyle} = application:get_env(egithub, review_style, pr_review),
288-
case ReviewStyle of
287+
case application:get_env(egithub, review_style, pr_review) of
289288
individual_comments ->
290289
{ok, LineComments} = egithub:pull_req_comments(Cred, Repo, PR),
291290
{ok, IssueComments} = egithub:issue_comments(Cred, Repo, PR),

0 commit comments

Comments
 (0)