Merge main into opted-in PRs
Dispatch the index’s merge-main.yml: merge main into each opted-in PR branch when it moves, and comment where it cannot. Started with the standard GitHub CLI; the run is watched with gh run watch.
| Tool | ci-merge-main |
| IRI | https://litlfred.github.io/folio-assistant/cat-harness/tools/ci-merge-main.jsonld |
| part of | https://litlfred.github.io/folio-assistant/cat-harness/cat-harness.jsonld |
| type | https://litlfred.github.io/cat-harness/v0/ns/Tool |
| declared by | cat-harness |
| invoked | shell |
| qa | qa-reports |
Skills it satisfies
A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.
prepare-merge
Take a feature branch to a clean, conflict-free, green, pushed state so it can be merged with no surprises: base merged in, generated files regenerated, the folio’s content-type gates run, then pushed. It does NOT merge and does NOT push to the default branch. Use for “prepare-merge”, “make it mergeable”, “ship it”.
Source: cat-harness/sdlc/skills/sdlc-core/prepare-merge.md.
Also satisfied by: gates-merged, judge-tree, merge-train.
The skill declares no I/O contract (schemas/skills/prepare-merge/{input,output}.schema.json).
Inputs and outputs
Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.
| port | type | required | description | constraint | |
|---|---|---|---|---|---|
| in | repo | RepoFullName | The repository whose workflow is run. Default: the current one. | string · pattern ^[A-Za-z0-9][A-Za-z0-9._-]*\\/[A-Za-z0-9][A-Za-z0-9._-]*$ · A forge repository’s full name, owner/name | |
| in | ref | Branch | The branch to run it on. Default: the default branch. | string · pattern ^[A-Za-z0-9][A-Za-z0-9._/-]*$ · A git branch name | |
| out | run | Text | The dispatched run; its outcome is read with gh run watch or gh run view. | string · A short single-line human string. Not admissible as a command-line argument. |
Processes and tasks
Steps this Tool can carry out, because each names a skill it satisfies:
| process | step | lane | via skill |
|---|---|---|---|
| Code change and review | Prepare the merge, and watch it through | Authoring agent | prepare-merge |
| Merge the base branch in | Merge the base in, without committing | merge:main command | prepare-merge |
| Merge the base branch in | Regenerate, asking every CI gate | merge:main command | prepare-merge |
| Merge the base branch in | Resolve by hand, then regenerate | Authoring agent | prepare-merge |
| A refused merge-train member | Fix the PR, report on the PR | Owning session | prepare-merge |
| A merge train | Merge each member onto the base | Build pipeline | prepare-merge |
| Adopting an upstream version bump | Move the pin and open the PR | Agent | prepare-merge |
| Merge and publish a content change | Merge, on explicit confirmation | Review Committee | prepare-merge |
| Content Change and Review | Merge and publish | CI/CD Pipeline | prepare-merge |
| Guideline Updates | Merge the re-pin with its decided revisions | Re-pin steward and build pipeline | prepare-merge |
How it is deployed and reached
- Command line. From the repository root:
gh workflow run merge-main.yml. - GitHub Actions. No workflow in this checkout runs its command.
As an API: its operation in the OpenAPI document and the MCP tool list of its layer.
| install | cli: gh |
| runtime | gh |
| network | yes |
When a host it reaches is refused:
| host / error | remedy |
|---|---|
github.com | none: The workflow runs on GitHub; with no host there is nothing to dispatch. The scripts it runs can still be run locally by their own keys. |
| when to choose it | |
|---|---|
| when | Running the merge-main.yml workflow on demand instead of waiting for its trigger, or finding which workflow a CI step belongs to. |
| limits | Needs a token that may dispatch workflows (actions: write) on the repository. |
| cost | A full CI run on GitHub’s runners. |
What it is made of
Its definition names no file it is made of.
Linked data
The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/cat-harness/tools/ci-merge-main.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.
{
"@context": "https://litlfred.github.io/folio-assistant/cat-harness/cat-harness.context.jsonld",
"@id": "https://litlfred.github.io/folio-assistant/cat-harness/tools/ci-merge-main.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "https://litlfred.github.io/folio-assistant/cat-harness/cat-harness.jsonld",
"name": "ci-merge-main",
"title": "Merge main into opted-in PRs",
"description": "Dispatch the index's `merge-main.yml`: merge `main` into each opted-in PR branch when it moves, and comment where it cannot. Started with the standard GitHub CLI; the run is watched with `gh run watch`.",
"install": {
"cli": "gh"
},
"invoke": {
"shell": "gh workflow run merge-main.yml"
},
"io": {
"inputs": [
{
"name": "repo",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoFullName",
"description": "The repository whose workflow is run. Default: the current one.",
"required": false,
"arg": {
"flag": "--repo"
}
},
{
"name": "ref",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Branch",
"description": "The branch to run it on. Default: the default branch.",
"required": false,
"arg": {
"flag": "--ref"
}
}
],
"outputs": [
{
"name": "run",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
"description": "The dispatched run; its outcome is read with `gh run watch` or `gh run view`."
}
]
},
"satisfies": [
"prepare-merge"
],
"requirements": {
"runtime": [
"gh"
],
"network": true
},
"remedies": [
{
"host": "github.com",
"none": "The workflow runs on GitHub; with no host there is nothing to dispatch. The scripts it runs can still be run locally by their own keys."
}
],
"selection": {
"when": "Running the `merge-main.yml` workflow on demand instead of waiting for its trigger, or finding which workflow a CI step belongs to.",
"limits": "Needs a token that may dispatch workflows (actions: write) on the repository.",
"cost": "A full CI run on GitHub's runners."
}
}