Skip to content

Commit 80e4093

Browse files
Fix function deprecation of merge(::URI) (#191)
1 parent 8d734e4 commit 80e4093

29 files changed

+98
-94
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
1010
MbedTLS = "739be429-bea8-5141-9913-cc70e7f3736d"
1111
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
1212
SodiumSeal = "2133526b-2bfb-4018-ac12-889fb3908a75"
13+
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
1314

1415
[compat]
15-
HTTP = "0.8, 0.9"
16+
HTTP = "0.9"
17+
URIs = "1.1"
1618
JSON = "0.19, 0.20, 0.21"
1719
MbedTLS = "0.6, 0.7, 1"
1820
SodiumSeal = "0.1"

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ GitHub.jl implements a bunch of methods that make REST requests to GitHub's API.
115115
| `create_file(repo, path)` | `Dict` | [create a file at `path` in `repo`](https://developer.github.com/v3/repos/contents/#create-a-file) |
116116
| `update_file(repo, path)` | `Dict` | [update a file at `path` in `repo`](https://developer.github.com/v3/repos/contents/#update-a-file) |
117117
| `delete_file(repo, path)` | `Dict` | [delete a file at `path` in `repo`](https://developer.github.com/v3/repos/contents/#delete-a-file) |
118-
| `permalink(content::Content, commit)` | `HTTP.URI` | [get a permalink for `content` at the SHA specified by `commit`](https://help.github.com/articles/getting-permanent-links-to-files/) |
118+
| `permalink(content::Content, commit)` | `URIs.URI` | [get a permalink for `content` at the SHA specified by `commit`](https://help.github.com/articles/getting-permanent-links-to-files/) |
119119
| `readme(repo)` | `Content` | [get `repo`'s README](https://developer.github.com/v3/repos/contents/#get-the-readme) |
120120
| `create_status(repo, sha)` | `Status` | [create a status for the commit specified by `sha`](https://developer.github.com/v3/repos/statuses/#create-a-status) |
121121
| `statuses(repo, ref)` | `Tuple{Vector{Status}, Dict}` | [get the statuses posted to `ref`](https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref) |
@@ -397,19 +397,19 @@ The `EventListener` constructor takes the following keyword arguments:
397397
- `secret`: A string used to verify the event source. If the event is from a GitHub Webhook, it's the Webhook's secret. If a secret is not provided, the server won't validate the secret signature of incoming requests.
398398
- `repos`: A vector of `Repo`s (or fully qualified repository names) listing all acceptable repositories. All repositories are whitelisted by default.
399399
- `events`: A vector of [event names](https://developer.github.com/webhooks/#events) listing all acceptable events (e.g. ["commit_comment", "pull_request"]). All events are whitelisted by default.
400-
- `forwards`: A vector of `HTTP.URI`s (or URI strings) to which any incoming requests should be forwarded (after being validated by the listener)
400+
- `forwards`: A vector of `URIs.URI`s (or URI strings) to which any incoming requests should be forwarded (after being validated by the listener)
401401

402402
Here's an example that demonstrates how to construct and run an `EventListener` that does benchmarking on every commit and PR:
403403

404404
```julia
405405
import GitHub
406-
406+
import URIs
407407
# EventListener settings
408408
myauth = GitHub.authenticate(ENV["GITHUB_AUTH"])
409409
mysecret = ENV["MY_SECRET"]
410410
myevents = ["pull_request", "push"]
411411
myrepos = [GitHub.Repo("owner1/repo1"), "owner2/repo2"] # can be Repos or repo names
412-
myforwards = [HTTP.URI("http://myforward1.com"), "http://myforward2.com"] # can be HTTP.URIs or URI strings
412+
myforwards = [URIs.URI("http://myforward1.com"), "http://myforward2.com"] # can be URIs.URIs or URI strings
413413

414414
# Set up Status parameters
415415
pending_params = Dict(
@@ -550,8 +550,9 @@ Following example shows obtaining repository info `private/Package.jl` on github
550550

551551
```julia
552552
import GitHub
553+
import URIs
553554

554-
api = GitHub.GitHubWebAPI(HTTP.URI("https://git.company.com/api/v3"))
555+
api = GitHub.GitHubWebAPI(URIs.URI("https://git.company.com/api/v3"))
555556
myauth = GitHub.authenticate(api, ENV["GITHUB_AUTH"])
556557
myrepo = GitHub.repo(api, "private/Package.jl", auth=myauth)
557558
```

src/GitHub.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ using Base64
88
##########
99

1010
import HTTP,
11+
URIs,
1112
JSON,
1213
MbedTLS,
1314
Sockets,

src/activity/events.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct EventListener
6969
secret = nothing, events = nothing,
7070
repos = nothing, forwards = nothing)
7171
if !(isa(forwards, Nothing))
72-
forwards = map(HTTP.URI, forwards)
72+
forwards = map(URIs.URI, forwards)
7373
end
7474

7575
if !(isa(repos, Nothing))

src/apps/checks/runs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
app::Union{App, Nothing}
1616
pull_requests::Union{Vector{PullRequest}, Nothing}
1717
check_suite::Union{CheckSuite, Nothing}
18-
html_url::Union{HTTP.URI, Nothing}
18+
html_url::Union{URIs.URI, Nothing}
1919
end
2020
namefield(cr::CheckRun) = cr.id
2121

src/gists/gist.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
@ghdef mutable struct Gist
2-
url::Union{HTTP.URI, Nothing}
3-
forks_url::Union{HTTP.URI, Nothing}
4-
commits_url::Union{HTTP.URI, Nothing}
2+
url::Union{URIs.URI, Nothing}
3+
forks_url::Union{URIs.URI, Nothing}
4+
commits_url::Union{URIs.URI, Nothing}
55
id::Union{String, Nothing}
66
description::Union{String, Nothing}
77
public::Union{Bool, Nothing}
88
owner::Union{Owner, Nothing}
99
user::Union{Owner, Nothing}
1010
truncated::Union{Bool, Nothing}
1111
comments::Union{Int, Nothing}
12-
comments_url::Union{HTTP.URI, Nothing}
13-
html_url::Union{HTTP.URI, Nothing}
14-
git_pull_url::Union{HTTP.URI, Nothing}
15-
git_push_url::Union{HTTP.URI, Nothing}
12+
comments_url::Union{URIs.URI, Nothing}
13+
html_url::Union{URIs.URI, Nothing}
14+
git_pull_url::Union{URIs.URI, Nothing}
15+
git_push_url::Union{URIs.URI, Nothing}
1616
created_at::Union{Dates.DateTime, Nothing}
1717
updated_at::Union{Dates.DateTime, Nothing}
1818
forks::Union{Vector{Gist}, Nothing}

src/git/blob.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@ghdef mutable struct Blob
22
content::Union{String, Nothing}
33
encoding::Union{String, Nothing}
4-
url::Union{HTTP.URI, Nothing}
4+
url::Union{URIs.URI, Nothing}
55
sha::Union{String, Nothing}
66
size::Union{Int, Nothing}
77
end

src/git/gitcommit.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@ghdef mutable struct GitCommit
22
sha::Union{String, Nothing}
3-
url::Union{HTTP.URI, Nothing}
3+
url::Union{URIs.URI, Nothing}
44
author::Union{Dict, Nothing}
55
commiter::Union{Dict, Nothing}
66
message::Union{String, Nothing}

src/git/reference.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@ghdef mutable struct Reference
22
ref::Union{String, Nothing}
3-
url::Union{HTTP.URI, Nothing}
3+
url::Union{URIs.URI, Nothing}
44
object::Union{Dict, Nothing}
55
end
66

src/git/tag.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@ghdef mutable struct Tag
22
tag::Union{String, Nothing}
33
sha::Union{String, Nothing}
4-
url::Union{HTTP.URI, Nothing}
4+
url::Union{URIs.URI, Nothing}
55
message::Union{String, Nothing}
66
tagger::Union{Dict, Nothing}
77
object::Union{Dict, Nothing}

0 commit comments

Comments
 (0)