Repository navigation
basou: Observe a check run by its name on a board, and let every observation carry notes - #362
Merged
Merged
Conversation
…rvation carry notes - board.yaml: board_version 3 adds the observation kind github_check: a GitHub repository, the name of a check run (check) and a branch (main when it names none). Its value is the conclusion of the newest check run of that name on the head commit of the branch, or its status while it has not finished. A check name that is empty, longer than 255 characters, holds a control character or a quote, or starts with '-' is refused. - board.yaml: from board_version 3, every observation may have notes, in the shape of a stage's or a lane's. A board of version 1 or 2 that has them, or a github_check, is told that version 3 reads them. - board guide: a gh api command that asks for the check runs of heads/<branch> by check_name, 100 to a page, and takes the one with the highest id: the API lists one for each check suite that ran the check, in an order it does not document, and heads/ keeps a branch named like a commit from being read as one. An empty line is no run of that name on the head commit. Each observation's notes are printed under its commands as "mind:". - board init's comment on observe names github_check and notes.
…ithub_check in the guide - board.yaml: a branch a github_ci or github_check observation names may not have a part that starts with '.', in a board of any version. git takes no such branch, and GitHub reads a/./b in the path of a request as a/b, another branch. - board guide: the source of a github_check is written as the GET it is (gh api -X GET ...); with -f fields and no -X GET, gh sends a POST. - board guide: when a check has more runs than the 100 a page holds, the command prints a second line saying so, and the guide says to keep the first line as the value and say in a footnote that it may not be the newest. The page and the line share one constant. - board guide: an empty line is a head commit that never started the check (a path filter, a skip marker in its commit message, or the app's own rules); a job a workflow skipped with if: is a check run concluded skipped. - board guide: the branch and the repository of a github_check are Markdown code in its prose, as the check name is, so '_' is not read as emphasis. Tests hold the check name's code spans there.
takashi-matsuyama
force-pushed
the
board/observe-github-check
branch
from
October 17, 2026 07:21
cdb90e2 to
30f2ac6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The second of the changes that move
basou board(experimental) to a new shape of its declaration and its records. Like the first, it lands on the integration branchboard/shape-v3, not onmain; all of them go tomainand out in one release.What changes
The observation kind
github_check(fromboard_version: 3): a GitHub repository, the name of a check run (check) and abranch(mainwhen it names none), for a check run a GitHub App reports (a deploy, for one) as well as a job of a workflow. Its value is the conclusion of the newest check run of that name on the head commit of the branch, or its status while it has not finished.github_ci, which takes the file name of a workflow and looks at the latest run of the workflow on the branch, stays as it is.:. One that is empty, longer than 255 characters (counted as characters, not UTF-16 code units), holds a control character or a', or starts with-is refused. The repository and the branch are held togithub_ci's shapes.A branch a
github_ciorgithub_checkobservation names may not have a part that starts with., in a board of any version. git takes no such branch, and GitHub readsa/./bin the path of a request asa/b:commits/heads/board/./observe-http/check-runsanswers with the check runs ofboard/observe-http.noteson every observation (fromboard_version: 3): what to mind when making it, in the shape of a stage's or a lane'snotes. A record keeps them with the declaration it holds.basou board guidegives the command for agithub_check; basou still sends nothing:-X GET, so the fields are the query. The source the guide gives for the record saysgh api -X GET ...too: without it, gh sends-ffields as a POST.heads/<branch>: as the API documents a branch. Without it, a branch named like a commit is read as one (commits/5fbd37a/...lists that commit's runs;commits/heads/5fbd37a/...is a 422 when no such branch exists). A branch with/works either way.max_by(.id): the API lists one run for each check suite that ran the check, the defaultfilter=latestincluded (a commit whose release workflow ran twice lists two runs of each of its jobs), and does not document the order.per_page=100, so the newest is on the page read; when the name has more runs than that, a second line saysmore than 100 runs: <n>, and the guide says to keep the first line as the value and say in a footnote that it may not be the newest. The 100 of the page and of the line are one constant.[skip ci]in its commit message, or the app's own rules) gives this too, even when what the check looks after is fine, and that a job a workflow skipped withif:is a check run, concludedskipped. A branch that does not exist exits 1 (HTTP 422)._is not read as emphasis.Each observation's
notesare printed under its commands as- mind: ..., escaped as the stages' and the lanes' are.A board of version 1 or 2 with a
github_checkor an observation'snotesis told that version 3 reads it (observe[0].kind: 'github_check' is read from board_version 3 on; this file is board_version 2,observe[1]: 'notes' is read from board_version 3 on; ...).basou board init's comment onobservenamesgithub_checkandnotes.Tests
github_checktakes and refuses (the name's characters and length, at 255 and 256, in characters; the repo, the branch,workflow), a branch with a part that starts with.refused forgithub_ciandgithub_checkalike (a/./b,release/.x) whilea.b/c.dis taken,noteson every kind and what they refuse, the kinds a version 3 board names, and which version a problem of a version 1 or 2 board is put down to./, the value (the first line, the second line and its footnote, the empty line and what gives it,skippedfor a job skipped withif:) and the source with-X GET; the check name, the branch and the repository as Markdown code in the prose (a name with a backquote fenced by two); the command run against a stand-inghthat prints its arguments (the check name, with spaces,:, a backquote,$(...),"and;, arrives as one argument and runs nothing); and the notes under each observation, escaped, and none for one without.github_checkand each observation'snotesas declared;board recordrecords one andboard measuretells a version 2 board which version reads it.skippedbyif:), the second line with the threshold lowered to 1, an empty line with no run, a branch with/,heads/with a branch named like a commit, a branch that does not exist (exit 1, HTTP 422), anda/./bread asa/b.', which the declaration refuses); each of 20 mutations of the second commit's code fails a test.pnpm -r build,pnpm typecheck,pnpm -r test:coverage,pnpm test:scripts,pnpm lint,pnpm lint:langandpnpm lint:pathspass locally.