Skip to content

Commit

Permalink
Replace dependency on HttpCommon with HTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Oct 30, 2017
1 parent 563664c commit af083d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ julia 0.6
BenchmarkTools 0.2.0
GitHub
JSON
HttpCommon
HTTP
Compat 0.8.6
2 changes: 1 addition & 1 deletion src/Nanosoldier.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Nanosoldier

import GitHub, BenchmarkTools, JSON, HttpCommon
import GitHub, BenchmarkTools, JSON, HTTP

using Compat

Expand Down
8 changes: 4 additions & 4 deletions src/server.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ struct Server
handle = (event, phrase) -> begin
nodelog(config, 1, "received job submission with phrase $phrase")
if event.kind == "issue_comment" && !(haskey(event.payload["issue"], "pull_request"))
return HttpCommon.Response(400, "nanosoldier jobs cannot be triggered from issue comments (only PRs or commits)")
return HTTP.Response(400, "nanosoldier jobs cannot be triggered from issue comments (only PRs or commits)")
end
if haskey(event.payload, "action") && !(in(event.payload["action"], ("created", "opened")))
return HttpCommon.Response(204, "no action taken (submission was from an edit, close, or delete)")
return HTTP.Response(204, "no action taken (submission was from an edit, close, or delete)")
end
submission = JobSubmission(config, event, phrase.match)
addedjob = false
Expand All @@ -33,9 +33,9 @@ struct Server
end
if !(addedjob)
reply_status(submission, "error", "invalid job submission; check syntax")
HttpCommon.Response(400, "invalid job submission")
HTTP.Response(400, "invalid job submission")
end
return HttpCommon.Response(202, "received job submission")
return HTTP.Response(202, "received job submission")
end

listener = GitHub.CommentListener(handle, TRIGGER;
Expand Down

0 comments on commit af083d0

Please sign in to comment.