Sync: rewrite upstream-ci and pull-request against the Forgejo API #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (capability): the nightly upstream sync runs on the forge again: it merges upstream main, runs the fork's checks and upstream's core CI on the sync branch, and opens a pull request on the forge for a human to read.
Refs macula-io/martha#601.
Why
The Supervisor's ruling on the martha-engine forge port (2026-11-22, Q3 (a)): park
martha-engine-sync.ymlon the forge now (every job guarded byif: github.server_url == 'https://github.com'), and file the Forgejo API rewrite as its own package.The
mergeandchecksjobs would work on the forge as they are. Two jobs call the GitHub API throughghand cannot:upstream-ci(lines 78-100):gh workflow run ci.yml --ref "$BRANCH",gh run list ... --json databaseId,gh run watch --exit-status.pull-request(lines 124-144):gh api repos/${GH_REPO}/commits/${SYNC},gh pr create.What the rewrite has to answer
/actions/runsgives status and conclusion by commit_sha, so the wait reads runs by the sync tip, without polling hard.POST /api/v1/repos/{owner}/{repo}/pullswith head, base, title and body; first check whether one is already open for that head.Done when
gh, and the server_url guard is lifted from the sync on the forge only.