mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-24 00:53:05 +00:00
Workflows nativos em .forgejo/workflows/ (ci, ci-pr, agent-pool, automerge, issue-transition, plan-issue, vercel-promote, archive), removendo .github/workflows e .github/actions. Runner Forgejo v13 com services Postgres por porta + DB_HOST via gateway do bridge. Libs de agente sobre o novo cliente forgejo-api.mjs (zero dependências, GITHUB_SERVER_URL/FORGEJO_API_URL), helpers de workflow plain-Node. pnpm issue corrigido (await em função sync) e validado ao vivo. Testes: forgejoApi.unit.spec.ts novo, pin do matrix do ci.yml atualizado. Closes #1 (parte 1 — docs/issues/pool seguem na parte 2)
34 lines
1.5 KiB
YAML
34 lines
1.5 KiB
YAML
# Safety net: agent PRs (cursor/* → main) must be Ready + auto-merge.
|
|
# Covers Cloud ManagePullRequest defaulting to draft and agents that forget
|
|
# to arm the merge. No skill opt-out (engineering-audit included).
|
|
#
|
|
# Forgejo port (OPS50): Forgejo's API has no auto-merge scheduling, so the
|
|
# workflow runs scripts/forgejo-pr-automerge.mjs (plain Node): marks draft →
|
|
# ready, waits for the commit statuses (the branch-protection `checks` gate),
|
|
# then merges by rebase. Same semantics as `gh pr merge --auto --rebase`,
|
|
# implemented as poll + merge. GitHub's cancel-workflow-on-failure action was
|
|
# dropped (no GITHUB_RUN_ID plumbing on Forgejo).
|
|
name: Agent PR Ready + auto-merge
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, synchronize, ready_for_review, converted_to_draft]
|
|
branches: [main]
|
|
|
|
jobs:
|
|
ready-automerge:
|
|
if: >-
|
|
github.event.pull_request.state == 'open' &&
|
|
startsWith(github.event.pull_request.head.ref, 'cursor/')
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 40
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
# Script is plain Node (stdlib) — no pnpm. Disable package-manager-cache:
|
|
# setup-node@v5 defaults to true and looks for pnpm before pnpm/action-setup.
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 24
|
|
package-manager-cache: false
|
|
- name: Mark Ready and merge when checks pass
|
|
run: node scripts/forgejo-pr-automerge.mjs --pr "${{ github.event.pull_request.number }}"
|