- Add skills/gitea-to-github/SKILL.md (42 lines) and references (remote-and-mirror, ci-and-contracts, entity-migration) - Update profile/AGENTS.md with Gitea pull mirroring wording and zero-network session-start check (forge: gitea / git config gitea.sovereign opt-out) - Reference /gitea-to-github from projects, planning-contract.md, and gt-usage; register in install.sh (16 active skills) - Add single-behavior behavioral contract tests in tests/fixtures/test_skills_behavioral_contracts.py (37/37 regression checks passing)
3.2 KiB
3.2 KiB
Org Inventory, Issues, Milestones & Conditional Projects v2
Detailed procedure for Steps 1, 4, and 6 of gitea-to-github.
1. Segmented --org Dry-Run Inventory
- Paginated Gitea Discovery: Query all org repositories, open PRs, and open issues using paginated Gitea API calls (
page=1..N). - Classification Taxonomy: Classify each repository into one or more states:
migratable(clean-slate)already-pull-mirror(mirror: true)sovereign-opt-out(forge: giteainAGENTS.md)has-lfs-blockedhas-open-prshas-open-issuesempty(0 commits)archived(archived: true)
- Segmentation: Present a single dry-run inventory table segmented into:
- Clean-slate: Zero open PRs and no per-item curation needed; execute sequentially from one approval (applying any user-stated overrides such as visibility or target org).
- Interactive-gated: Has open PRs (
has-open-prs) or open issues needing curation (has-open-issues); prompt per repository before mutation.
2. Milestones & Idempotent Issue Migration
- Paginated GitHub Queries: Fetch existing GitHub milestones and issues to guarantee idempotent
/diagnoseresume:gh api --paginate repos/{owner}/{repo}/milestones?state=all gh api --paginate repos/{owner}/{repo}/issues?state=all --jq '.[] | select(.pull_request == null)' - Milestones: Match Gitea open milestones by
title. Create missing milestones on GitHub withtitle,description, anddue_on(omittingdue_onwhenever the Gitea timestamp is null or zero). - Labels & Attachments:
- Pre-create any missing Gitea issue labels on GitHub before creating issues (
gh label createwith color/description). - Scan curated open Gitea issue bodies for
/attachments/<uuid>URLs; warn the user before archive deletion that those links will break once<repo>-archive-YYYYMMDDHHMMSSis removed.
- Pre-create any missing Gitea issue labels on GitHub before creating issues (
- Immutable Deduplication Marker: Append the following marker to the bottom of every migrated GitHub issue body (with
<gitea-host>normalized to lowercase hostname without scheme or port):Skip any Gitea issue whose origin marker already appears in the paginated GitHub issues list.<!-- gitea-origin: <gitea-host>/<owner>/<repo>#<number> -->
3. Conditional Projects v2 Onboarding
- Trigger Condition: Create or link a 5-column Projects v2 board (
Backlog,Ready,Work in Progress,Review,Completed) only when the source repo has a legacy Gitea board/contract or when the user explicitly opts in during dry-run. Leave new board creation for boardless repos toprojects(respecting its tieredProject Board Policy). - GraphQL Delegation: Delegate all Projects v2 GraphQL mutations strictly to
../../projects/references/github-projects-v2.md. - Column Mapping: Map legacy Gitea board columns case-insensitively onto the 5 canonical GitHub columns:
To Do,Open,Backlog->BacklogReady->ReadyIn Progress,Doing,Work in Progress->Work in ProgressReview,In Review->ReviewDone,Closed,Completed->Completed- Unmatched column names -> fallback to
Backlog.