Skip to content

ci: set and read board fields through a Board workflow - #65

Merged
MathiasVDA merged 4 commits into
mainfrom
claude/project-thread-k94pkm
Nov 20, 2026
Merged

MathiasVDA merged 4 commits into
mainfrom
claude/project-thread-k94pkm

Conversation

@MathiasVDA

@MathiasVDA MathiasVDA commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Tools that only have the REST API with a repository-scoped token cannot reach GitHub Projects, so they can neither read nor set the board's fields. They can start workflows and read job logs, so this adds a Board workflow (workflow_dispatch) that does the project work with the PROJECT_TOKEN secret:

  • item empty lists every open item on the board (all includes closed ones), one row per item with its Status, Worker, Area, Release and other fields.
  • item = 42 or tripletrail-demo#3 shows that item's fields.
  • set = Worker=Builder 1; Status=In progress sets fields (single select, text, number, date). Names match without regard to case, dashes may stand for spaces, an empty value clears. An item not on the board yet is added first. An unknown field or option fails the run and lists the valid names.

The result is printed between ----- board result ----- / ----- end ----- in the job log as a tab-separated table, and in the run summary. .github/board.sh starts the run over the REST API, finds it by a request id in its run name, waits for its conclusion and prints the table (exit 1 when the run fails).

A public repository's logs are public, so a run in a public repository lists and accepts only items of public repositories; board.sh runs the workflow in a private repository by default.

The Project workflow no longer mirrors worker:/status: labels into the board; it only adds new issues and pull requests (and the manual backfill).

How it was tested

  • The workflow script was run under Node against a mocked github.graphql: listing (open/all) in a public and a private repository, reading, setting, clearing, a private item asked for from a public repository, and bad field/option names. bash -n on board.sh.
  • Live runs from the other repositories: listing, reading and setting an item, a private item refused from a public repository, a bad option.

Documentation

  • No user-facing change (CI tooling only; usage is in the workflow and script headers)

Adds a workflow_dispatch workflow, Board, that reads an item's project fields, lists the board, or sets fields (Worker, Status, Area, Release, ...) with the PROJECT_TOKEN secret, and .github/board.sh, which starts it over the REST API, waits and prints the result. Tools without access to GitHub Projects use it instead of labels.

The Project workflow no longer mirrors worker: and status: labels into the board; it only adds new issues and pull requests.
A public repository's job logs, summaries and run names are public. The Board workflow now lists and accepts only items of public repositories when it runs in a public repository, and board.sh runs it in tripletrail-enterprise by default; a bare number still means an item of the checkout's own repository.
issueOrPullRequest cannot be a draft issue, so GitHub rejected the query and every single-item run failed.
A run can report completed before its conclusion is set, which made board.sh report a successful run as failed.
@MathiasVDA
MathiasVDA merged commit a2d5f92 into main Nov 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant