Skip to content

Commit f126fe7

Browse files
committed
Fix test_yggdrasil_pr()
1 parent a07d07a commit f126fe7

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/Wizard.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module Wizard
33
using BinaryBuilderBase, OutputCollectors, ..Auditor
44
using Random
55
using GitHub, LibGit2, Pkg, Sockets, ObjectFile
6+
import GitHub: gh_get_json, DEFAULT_API
67
using JSON
78
import SHA: sha256
89
using REPL

src/wizard/deploy.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,12 @@ function yggdrasil_deploy(state::WizardState, open_pr::Bool = true)
133133
)
134134
end
135135

136-
function yggdrasil_deploy(name, version, patches, build_tarballs_content; open_pr::Bool=false, branch_name=nothing)
136+
function yggdrasil_deploy(name, version, patches, build_tarballs_content;
137+
open_pr::Bool=false,
138+
branch_name=nothing,
139+
gh_auth = github_auth(;allow_anonymous=false),
140+
gh_username=gh_get_json(DEFAULT_API, "/user"; auth=gh_auth)["login"])
137141
# First, fork Yggdrasil (this just does nothing if it already exists)
138-
gh_auth = github_auth(;allow_anonymous=false)
139142
fork = GitHub.create_fork("JuliaPackaging/Yggdrasil"; auth=gh_auth)
140143

141144
mktempdir() do tmp

src/wizard/yggdrasil.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function test_yggdrasil_pr(pr_number::Integer)
170170
if what_do == 1
171171
dummy_name = basename(dirname(build_tarballs_path))
172172
dummy_version = v"1.33.7"
173-
yggdrasil_deploy(dummy_name, dummy_version, read(build_tarballs_path))
173+
yggdrasil_deploy(dummy_name, dummy_version, [], read(build_tarballs_path))
174174
elseif what_do == 2
175175
cd(dirname(build_tarballs_path))
176176
run(`git diff`)

0 commit comments

Comments
 (0)