Internals
RegistryCI
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.
AutoMerge
AutoMerge.extract_github_owner_repo — Methodextract_github_owner_repo(repo_url::AbstractString)Extracts the owner and repository name from a GitHub URL. Returns a tuple (owner, repo) or nothing if the URL is not a valid GitHub URL.
AutoMerge.find_previous_semver_version — Methodfind_previous_semver_version(pkg::AbstractString, current_version::VersionNumber, registry_path::AbstractString) -> Union{VersionNumber, Nothing}Finds the previous semver version for a package. Returns the maximum version that is less than the current version, or nothing if there are no previous versions.
AutoMerge.format_github_diff_url — Methodformat_github_diff_url(repo_url::AbstractString, previous_commit_sha::AbstractString, current_commit_sha::AbstractString) -> Union{AbstractString, Nothing}Generates a GitHub diff URL comparing two commits. Returns the URL AbstractString, or nothing if the repository is not on GitHub.
AutoMerge.get_all_pkg_name_uuids — Methodget_all_pkg_name_uuids(registry_dir::AbstractString)
get_all_pkg_name_uuids(registry::RegistryInstance)Given either a path to an uncompressed registry directory or a RegistryInstance object (from RegistryInstances.jl), returns a sorted vector of NamedTuples with name and uuid fields for all packages in the registry and Julia's standard libraries.
AutoMerge.get_version_diff_info — Methodget_version_diff_info(data) -> Union{NamedTuple, Nothing}Gets diff information for a new version registration. Returns a NamedTuple with fields:
diff_stats: string summarizing the git diff between package versionsdiff_url: GitHub diff URL, if available. Otherwisenothing.previous_version: Previous version numbercurrent_version: Current version number
Returns nothing if no previous version exists or package is not a NewVersion.
AutoMerge.is_github_repo — Methodis_github_repo(repo_url::AbstractString) -> BoolChecks if a repository URL is a GitHub repository.
AutoMerge.load_files_from_url_and_tree_hash — Methodload_files_from_url_and_tree_hash(f, destination::String, url::String, tree_hash::String, pkg_clone_dir::String) -> BoolAttempts to clone a git repo from url into pkg_clone_dir (or reuse existing clone if it exists), runs f(dir) on that directory, then extract the files and folders from a given tree_hash, placing them in destination.
The repository is cloned into pkg_clone_dir.
Returns a boolean indicating if the cloning succeeded.
AutoMerge.maybe_create_blocked_label — Methodmaybe_create_blocked_label(api, repo)Add the label AutoMerge: last run blocked by comment to the repo if it doesn't already exist.
Returns whether or not it created the label.
AutoMerge.parse_registry_pkg_info — Functionparse_registry_pkg_info(registry_path, pkg, version=nothing) -> @NamedTuple{uuid::String, repo::String, subdir::String, tree_hash::Union{Nothing, String}}Searches the registry located at registry_path for a package with name pkg. Upon finding it, it parses the associated Package.toml file and returns the UUID and repository URI, and subdir.
If version is supplied, then the associated tree_hash will be returned. Otherwise, tree_hash will be nothing.
AutoMerge.tree_sha_to_commit_sha — Methodtree_sha_to_commit_sha(tree_sha::AbstractString, clone_dir::AbstractString; subdir::AbstractString="") -> Union{AbstractString, Nothing}Converts a git tree SHA to a commit SHA by finding a commit that has that tree. Returns the commit SHA string, or nothing if no commit is found.
AutoMerge.try_remove_label — Methodtry_remove_label(api, repo, issue, label)Uses GitHub.remove_label to remove the label, if it exists. Differs from the upstream functionality by not erroring if we receive a 404 response indicating the label did not exist.
Returns whether or not the label was removed.
AutoMerge.uuid_passes_sanity_check — Methoduuid_passes_sanity_check(uuid::UUID) -> BoolChecks if a UUID conforms to RFC 4122 / RFC 9562 standards or is a historically buggy Julia version 1 UUID.
Standards-compliant UUIDs must have:
- Version field (bits 48-51): 1-8
- Variant field (bits 64-65): 10 binary (making the hex character at position 19 one of 8, 9, a, or b)
Julia's uuid1() implementation historically had a bug where it set the variant bits to 00 instead of 10. We allow these for backward compatibility.
Returns true if the UUID passes the sanity check, false otherwise.