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

Gracefully handle pull requests without bodies #512

Closed bauglir closed 1 year ago

bauglir commented 1 year ago

Calling repo_and_version_of_pull_request_body with an empty body causes errors due to occursin not handling Nothing values.

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

This could be handled using a separate dispatch, but this approach seems more in line with the rest of the codebase. Just let me know if you'd prefer the dispatch implementation instead and I'll get this updated.

Fixes #503.

DilumAluthge commented 1 year ago

Thanks Joris!

DilumAluthge commented 1 year ago

bors merge

bors[bot] commented 1 year ago

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here. For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.