Skip to content

Commit

Permalink
switch to using view for PkgEvalBadge
Browse files Browse the repository at this point in the history
  • Loading branch information
mileslucas committed Jan 7, 2022
1 parent d8ef706 commit 22bba0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/plugins/badges.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ function badges(::PkgEvalBadge)
"https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/report.html"
)
end

function view(::PkgEvalBadge, t::Template, pkg::AbstractString)
return Dict("PKG1" => first(pkg), "PKG" => pkg)
end
1 change: 0 additions & 1 deletion src/plugins/readme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ function view(p::Readme, t::Template, pkg::AbstractString)
"HAS_CITATION" => hasplugin(t, Citation) && getplugin(t, Citation).readme,
"HAS_INLINE_BADGES" => !isempty(strings) && p.inline_badges,
"PKG" => pkg,
"PKG1" => first(pkg) # for PkgEval badge, need first character
)
end

Expand Down

0 comments on commit 22bba0c

Please sign in to comment.