leanprover-community/hopscotch

Identify upstream breaking commits (bisect) and/or open a bump PR to keep a Lean 4 downstream pinned to the latest passing revision. Works with any GitHub-hosted Lean dependency — not tied to mathlib4.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit May 25, 2026
License
Apache 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: leanprover-community/hopscotch-action@89d470a8815bffe8452bca70ae32a942e9229d7d # v1.0.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
dependencyThe lakefile require name, e.g. "mathlib" or "batteries".yes
fromExclusive lower bound for the bisect range. Defaults to the current rev in lake-manifest.json for the named dependency. no""
toInclusive upper bound. Defaults to the upstream default-branch HEAD (resolved automatically by hopscotch when omitted). no""
project-dirPath to the Lean project root. Defaults to the repository root.no.
extra-argsAdditional arguments passed verbatim to `hopscotch dep`. Accepts single- or multi-line input; each line is word-split on whitespace, so you can group related flags across lines: extra-args: | --scan-mode linear --allow-dirty-workspace no""
hopscotch-versionhopscotch release tag (e.g. "v1.4.0") or "latest" to resolve the newest release automatically. Pinning to a specific version is recommended for reproducibility. nov1.4.0
max-window-sizeAbort if the commit range contains more than this many commits. Guards against runaway runs on ancient pins. Raise or remove if you intentionally need a large window. no3000
pin-toWhich commit the manifest should end up pinned to when an incompatibility is found. One of: last-good (default) — bump PR advances the manifest to the last passing commit (single force-pushed branch). The tracking issue surfaces the FKB. first-bad — fix PR pins the manifest to the first-known-bad commit on a per-FKB-SHA branch so maintainers can `gh pr checkout` and reproduce the break. No tracking issue is opened in this mode. Two invocations (one per mode) on the same workflow give you both a bump PR and a fix PR; running only one mode is fine. nolast-good
open-prOpen or update a PR when the manifest pin changes.notrue
pr-branchBranch name for the PR. In `pin-to: last-good` mode, this is the literal force-pushed branch (default `hopscotch/bump`). In `pin-to: first-bad` mode, this is a prefix and the actual branch is `<prefix>-<fkb-short7>` so fix PRs at different FKB SHAs don't collide (default `hopscotch/fix`). no""
pr-baseBase branch for the PR. Defaults to the repository default branch.no""
pr-labelsComma-separated list of labels to apply to the PR.no""
reviewersComma-separated list of GitHub usernames or team slugs to request review from on the PR (passed to `gh pr create --reviewer`). no""
open-issueOpen a GitHub issue when a culprit is found; update it on subsequent failures; close it automatically when the downstream recovers. Ignored (forced false) in `pin-to: first-bad` mode — the fix PR itself carries the FKB context. notrue
issue-labelsComma-separated list of labels to apply to the tracking issue.no""
github-tokenGitHub token for API calls and gh CLI operations (PR, issue, release resolution). Defaults to the job token. no${{ github.token }}
pr-tokenToken used to push the PR branch. Defaults to `github-token`. The default `GITHUB_TOKEN` does NOT trigger downstream workflow runs on the PR it creates — so if you want CI to run on the bump / fix PR, pass a GitHub App installation token here. no""
git-user-namegit user.name for the bump / fix commit.nogithub-actions[bot]
git-user-emailgit user.email for the bump / fix commit.no41898282+github-actions[bot]@users.noreply.github.com
namedescription
outcome"passed" | "incompatible" | "skipped" | "tool-error"
culprit-commitSHA of the first failing upstream commit (non-empty when outcome=incompatible).
last-good-commitSHA of the last passing upstream commit.
target-commitSHA that the --to ref resolved to.
previous-pinThe dependency rev in lake-manifest.json before this run.
new-pinThe dependency rev in lake-manifest.json after this run.
pr-numberPR number (empty when no PR was opened).
pr-urlPR URL (empty when no PR was opened).
pr-action"created", "updated", "up-to-date", or "none".
issue-numberTracking issue number (empty when not opened).
issue-urlTracking issue URL (empty when not opened).
summary-mdMarkdown summary from .lake/hopscotch/summary.md.