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

Support HTTP.jl 1.0 #196

Merged
merged 1 commit into from
Jun 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ SodiumSeal = "2133526b-2bfb-4018-ac12-889fb3908a75"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"

[compat]
HTTP = "0.9"
HTTP = "0.9, 1"
URIs = "1.1"
JSON = "0.19, 0.20, 0.21"
MbedTLS = "0.6, 0.7, 1"
6 changes: 3 additions & 3 deletions src/activity/events.jl
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ function handle_event_request(request, handle;
end

function Base.run(listener, args...; host = nothing, port = nothing, kwargs...)
if host != nothing || port != nothing
if host !== nothing || port !== nothing
Base.depwarn("The `host` and `port` keywords are deprecated, use `run(listener, host, port, args...; kwargs...)`", :run)
end
run(listener, host, port, args...; kwargs...)
@@ -127,7 +127,7 @@ function Base.run(listener::EventListener, host::HTTP.IPAddr, port::Int, args...
run(listener, sock, host, port, args...; kwargs...)
end

function Base.run(listener::EventListener, sock::Sockets.TCPServer, host::HTTP.IPAddr, port::Int, args...; kwargs...)
function Base.run(listener::EventListener, sock::Sockets.TCPServer, host, port, args...; kwargs...)
HTTP.serve(listener.handle_request, host, port; server=sock, kwargs...)
end

@@ -193,7 +193,7 @@ function handle_comment(handle, event::WebhookEvent, auth::Authorization,

trigger_match = match(trigger, body_container["body"])

if trigger_match == nothing
if trigger_match === nothing
return HTTP.Response(204, "trigger match not found")
end