JuliaRegistries / RegistryCI.jl

Continuous integration (CI) tools for Julia package registries, including registry consistency testing, automatic merging (automerge) of pull requests, and automatic TagBot triggers
https://juliaregistries.github.io/RegistryCI.jl/stable
Other
31 stars 30 forks source link

`repo_and_version_of_pull_request_body` crashes if there is a PR with empty body #503

Closed mofeing closed 1 year ago

mofeing commented 1 year ago

repo_and_version_of_pull_request_body crashes if there is a PR with empty body.

ERROR: MethodError: no method matching occursin(::String, ::Nothing)
Closest candidates are:
  occursin(::Union{AbstractChar, AbstractString}, ::AbstractString) at strings/search.jl:628
  occursin(::Any) at strings/search.jl:642
Stacktrace:
 [1] repo_and_version_of_pull_request_body(body::Nothing)
   @ RegistryCI.TagBot ~/.julia/packages/RegistryCI/3KBMb/src/TagBot/TagBot.jl:48
 [2] #1
   @ ~/.julia/packages/RegistryCI/3KBMb/src/TagBot/cron.jl:5 [inlined]
 [3] iterate
   @ ./generator.jl:47 [inlined]
 [4] _collect(c::Vector{GitHub.PullRequest}, itr::Base.Generator{Vector{GitHub.PullRequest}, RegistryCI.TagBot.var"#1#3"}, #unused#::Base.EltypeUnknown, isz::Base.HasShape{1})
   @ Base ./array.jl:807
 [5] collect_similar
   @ ./array.jl:716 [inlined]
 [6] map
   @ ./abstractarray.jl:2933 [inlined]
 [7] handle_cron(event::Dict{String, Any})
   @ RegistryCI.TagBot ~/.julia/packages/RegistryCI/3KBMb/src/TagBot/cron.jl:5
 [8] main()
   @ RegistryCI.TagBot ~/.julia/packages/RegistryCI/3KBMb/src/TagBot/TagBot.jl:43
 [9] top-level scope
   @ none:1
Error: Process completed with exit code 1.

After editing the body of the responsible PR, the error disappears.