Public API
RegistryCI.test
— Functiontest(path)
Run various checks on the registry located at path
. Checks for example that all files are parsable and understandable by Pkg and consistency between Registry.toml and each Package.toml.
If your registry has packages that have dependencies that are registered in other registries elsewhere, then you may provide the github urls for those registries using the registry_deps
parameter.
RegistryCI.AutoMerge.run
— Functionrun([env, cicfg::CIService]; kwargs...)
Run the RegistryCI.AutoMerge
service.
Arguments
env
: anAbstractDictionary
used to read environmental variables from. Defaults toENV
but a plainDict
can be passed to mimic an alternate environment.ciccfg
: Configuration struct describing the continuous integration (CI) environment in which AutoMerge is being run.
Keyword Arguments
merge_new_packages
: should AutoMerge merge registration PRs for new packagesmerge_new_versions
: should AutoMerge merge registration PRs for new versions of packagesnew_package_waiting_period
: new package waiting period, e.gDay(3)
.new_jll_package_waiting_period
: new JLL package waiting period, e.gMinute(20)
.new_version_waiting_period
: new package version waiting period, e.gMinute(10)
.new_jll_version_waiting_period
: new JLL package version waiting period, e.gMinute(10)
.registry
: the registry name you want to run AutoMerge on.tagbot_enabled
: if tagbot is enabled.authorized_authors
: list of who can submit registration, e.gString["JuliaRegistrator"]
.authorized_authors_special_jll_exceptions
: a list of users who can submit JLL packages (which have strict rules about allowed dependencies and are subject tonew_jll_*_waiting_period
s instead ofnew_*_waiting_period
s).additional_statuses
: list of additional commit statuses that must pass before AutoMerge will merge a PRadditional_check_runs
: list of additional check runs that must pass before AutoMerge will merge a PRerror_exit_if_automerge_not_applicable
: iffalse
, AutoMerge will not error on PRs made by non-AutoMerge-authorized usersmaster_branch
: name ofmaster_branch
, e.g you may want to specify this to"main"
for new GitHub repositories.master_branch_is_default_branch
: ifmaster_branch
specified above is the default branch.suggest_onepointzero
: should the AutoMerge comment include a suggestion to tag a 1.0 release for v0.x.y packages.point_to_slack
: should the AutoMerge comment recommend sending a message to the#pkg-registration
Julia-Slack channel when auto-merging is not possible.registry_deps
: list of registry dependencies, e.g your packages may depend onGeneral
.api_url
: the registry host API URL, default is"https://api.github.com"
.check_license
: check package has a valid license, default isfalse
.public_registries
: If a new package registration has a UUID that matches that of a package already registered in one of these registries supplied here (and has either a different name or different URL) then an error will be thrown. This to prevent AutoMerge from being used for "dependency confusion" attacks on those registries.read_only
: run in read only mode, default isfalse
.
Example
Here is an example of how General
registry is configured
using RegistryCI
using Dates
RegistryCI.AutoMerge.run(
merge_new_packages = ENV["MERGE_NEW_PACKAGES"] == "true",
merge_new_versions = ENV["MERGE_NEW_VERSIONS"] == "true",
new_package_waiting_period = Day(3),
new_jll_package_waiting_period = Minute(20),
new_version_waiting_period = Minute(10),
new_jll_version_waiting_period = Minute(10),
registry = "JuliaLang/General",
tagbot_enabled = true,
authorized_authors = String["JuliaRegistrator"],
authorized_authors_special_jll_exceptions = String["jlbuild"],
suggest_onepointzero = false,
point_to_slack = false,
additional_statuses = String[],
additional_check_runs = String[],
check_license = true,
public_registries = String["https://github.com/HolyLab/HolyLabRegistry"],
)