docs: update PLAN.md for single GitHub token
Replace GITHUB_MIRROR_TOKEN references with GITHUB_TOKEN. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
11
PLAN.md
11
PLAN.md
@@ -527,9 +527,8 @@ gitea-migration/
|
|||||||
| 33 | `MIGRATE_LABELS` | true/false | true |
|
| 33 | `MIGRATE_LABELS` | true/false | true |
|
||||||
| 34 | `MIGRATE_MILESTONES` | true/false | false |
|
| 34 | `MIGRATE_MILESTONES` | true/false | false |
|
||||||
| 35 | `MIGRATE_WIKI` | true/false | false |
|
| 35 | `MIGRATE_WIKI` | true/false | false |
|
||||||
| 36 | `GITHUB_MIRROR_TOKEN` | Non-empty | — |
|
| 36 | `GITHUB_MIRROR_INTERVAL` | Non-empty | 8h |
|
||||||
| 37 | `GITHUB_MIRROR_INTERVAL` | Non-empty | 8h |
|
| 37 | `NGINX_CONTAINER_NAME` | Non-empty | — |
|
||||||
| 38 | `NGINX_CONTAINER_NAME` | Non-empty | — |
|
|
||||||
| 39 | `NGINX_CONF_PATH` | Absolute path | — |
|
| 39 | `NGINX_CONF_PATH` | Absolute path | — |
|
||||||
| 40 | `SSL_MODE` | `letsencrypt` or `existing` | letsencrypt |
|
| 40 | `SSL_MODE` | `letsencrypt` or `existing` | letsencrypt |
|
||||||
| 41 | `SSL_EMAIL` | Email *(only if SSL_MODE=letsencrypt)* | — |
|
| 41 | `SSL_EMAIL` | Email *(only if SSL_MODE=letsencrypt)* | — |
|
||||||
@@ -667,7 +666,7 @@ gitea-migration/
|
|||||||
| Repos | `REPO_1_NAME` |
|
| Repos | `REPO_1_NAME` |
|
||||||
| Repos | `REPO_2_NAME` |
|
| Repos | `REPO_2_NAME` |
|
||||||
| Repos | `REPO_3_NAME` |
|
| Repos | `REPO_3_NAME` |
|
||||||
| Mirror | `GITHUB_MIRROR_TOKEN` |
|
| Mirror | `GITHUB_TOKEN` |
|
||||||
| Nginx | `NGINX_CONTAINER_NAME` |
|
| Nginx | `NGINX_CONTAINER_NAME` |
|
||||||
| Nginx | `NGINX_CONF_PATH` |
|
| Nginx | `NGINX_CONF_PATH` |
|
||||||
| Nginx | `SSL_EMAIL` |
|
| Nginx | `SSL_EMAIL` |
|
||||||
@@ -976,14 +975,14 @@ For each repo: clone, `rm -rf .gitea/workflows`, commit, push. Only if `.gitea/w
|
|||||||
|
|
||||||
**Depends on**: Phase 4 completed, GitHub mirror token set
|
**Depends on**: Phase 4 completed, GitHub mirror token set
|
||||||
**Produces**: Push mirrors from Gitea → GitHub configured for all repos
|
**Produces**: Push mirrors from Gitea → GitHub configured for all repos
|
||||||
**`require_vars`**: `GITEA_ADMIN_TOKEN` *(auto)*, `GITEA_INTERNAL_URL`, `GITEA_ORG_NAME`, `GITHUB_USERNAME`, `GITHUB_MIRROR_TOKEN`, `GITHUB_MIRROR_INTERVAL`, `REPO_1_NAME`, `REPO_2_NAME`, `REPO_3_NAME`
|
**`require_vars`**: `GITEA_ADMIN_TOKEN` *(auto)*, `GITEA_INTERNAL_URL`, `GITEA_ORG_NAME`, `GITHUB_USERNAME`, `GITHUB_TOKEN`, `GITHUB_MIRROR_INTERVAL`, `REPO_1_NAME`, `REPO_2_NAME`, `REPO_3_NAME`
|
||||||
|
|
||||||
**Steps for each repo**:
|
**Steps for each repo**:
|
||||||
1. Check if push mirror already exists: `gitea_api GET /repos/$ORG/$REPO/push_mirrors` — skip if non-empty
|
1. Check if push mirror already exists: `gitea_api GET /repos/$ORG/$REPO/push_mirrors` — skip if non-empty
|
||||||
2. Create push mirror: `gitea_api POST /repos/$ORG/$REPO/push_mirrors` with:
|
2. Create push mirror: `gitea_api POST /repos/$ORG/$REPO/push_mirrors` with:
|
||||||
- `remote_address`: `https://github.com/$GITHUB_USERNAME/$REPO.git`
|
- `remote_address`: `https://github.com/$GITHUB_USERNAME/$REPO.git`
|
||||||
- `remote_username`: `$GITHUB_USERNAME`
|
- `remote_username`: `$GITHUB_USERNAME`
|
||||||
- `remote_password`: `$GITHUB_MIRROR_TOKEN`
|
- `remote_password`: `$GITHUB_TOKEN`
|
||||||
- `interval`: `$GITHUB_MIRROR_INTERVAL`
|
- `interval`: `$GITHUB_MIRROR_INTERVAL`
|
||||||
- `sync_on_commit`: true
|
- `sync_on_commit`: true
|
||||||
3. Trigger initial sync: `gitea_api POST /repos/$ORG/$REPO/push_mirrors-sync`
|
3. Trigger initial sync: `gitea_api POST /repos/$ORG/$REPO/push_mirrors-sync`
|
||||||
|
|||||||
Reference in New Issue
Block a user