check

command
v0.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

check

check decides if a branch can be released. The verify job of .github/workflows/release.yml runs it.

A release needs two people for every change. Code on main gets its second person from the PR review. A release branch may also have commits that did not come through a PR on main, and GitHub has no rule that links them to a reviewed commit. check finds those commits, so the release approver knows what to read.

Rules

check fails if:

  • the version is not vX.Y.Z or vX.Y.Z-(rc|beta|alpha).N;
  • the ref is not main or release/vX.Y.Z for the same X.Y.Z;
  • the tag exists.

Then it takes base = merge-base(origin/main, origin/<ref>) and gives each commit in base..origin/<ref> a result:

Result Commit
accepted the same change as a commit on the first-parent chain of base..origin/main (a clean cherry-pick), and main did not revert it later
accepted changes only files under docs/
rejected a merge commit; check fails
review any other commit, such as a cherry-pick that needed conflict fixes; the approver reads it, and the publish job blocks an approver who committed it

Two commits make the same change if their diffs are equal apart from line numbers and blob IDs. The function name in each hunk header counts, so the same lines changed in another function go to review.

The first-parent chain holds the commits that main took itself: squash merges, rebase merges and direct pushes. The commits of a branch that a merge commit brings in do not count, because a later commit of that branch can undo a change. A revert anywhere on main counts.

Usage

git fetch origin '+refs/heads/*:refs/remotes/origin/*' --tags
go run ./scripts/release/check -ref release/v0.16.9 -version v0.16.9-rc.1 -repo NethermindEth/juno

It prints the Markdown report and appends it to the -summary file. It appends these lines to the -output file:

sha=<commit to release>
prerelease=<true or false>
review=<space-separated SHAs of the commits to review>

Documentation

Overview

Command check verifies that a release ref can be released: the version and ref match, the tag does not exist, and every commit that is not on main is a clean cherry-pick, docs only, or listed for the release approver to review.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL