สรุป / Summary
เอกสารที่ส่งมานี้เป็น GitHub Source Imports REST API สำหรับให้ระบบเริ่ม import repository จาก Git hosting ภายนอกเข้า GitHub แต่ประเด็นสำคัญคือ API ชุดนี้ถูกยกเลิกแล้ว จึงไม่ควรนำไปสร้าง integration ใหม่ในปี 2026 เพราะมนุษย์เราชอบสร้างระบบบน API ที่ถูกปิดไปแล้วเป็นพิเศษ
The documentation describes GitHub's Source Imports REST API, which was used to import repositories from external Git repositories into GitHub. However, this API has been retired, so it should not be used for a new integration in 2026.
สถานะสำคัญ / Current status
รายการ สถานะ
Source Imports API ❌ Retired
Import status endpoint ❌ Closed April 12, 2024
Update import ❌ Closed
Get commit authors ❌ Closed
Map commit authors ❌ Closed
Personal Access Token เดิมรองรับเฉพาะ PAT classic
GitHub Importer UI ยังเป็นแนวทางที่ GitHub แนะนำสำหรับกรณี import
Automation ใหม่ ควรใช้ Git/GitHub APIs หรือ migration tooling แทน
สิ่งที่ API เดิมเคยทำ / What the old API did
Workflow เดิมประมาณนี้:
External Git Repository
│
▼
Start Import
│
▼
Detect Repository
│
▼
Import Commits
│
├── Map Authors
│
├── Detect Large Files
│
└── Configure Git LFS
│
▼
Push to GitHub
│
▼
Complete
สถานะที่เคยได้รับ เช่น:
detecting
importing
mapping
pushing
complete
และ error states:
auth_failed
detection_needs_auth
detection_found_nothing
detection_found_multiple
error
แนวทางที่ควรใช้ในปี 2026 / Recommended 2026 architecture
ถ้าเป้าหมายของคุณคือสร้างระบบ automated repository migration/import สำหรับ project เช่น CrystalCastleX, pure-agent-dev หรือระบบ agent ของคุณเอง ผมแนะนำ architecture แบบนี้แทน:
Source Repository
│
│ git clone / mirror
▼
Migration Worker
│
├── Validate Git repository
├── Validate branches/tags
├── Validate LFS
├── Validate authors
└── Generate migration report
│
▼
Target GitHub Repository
│
├── git push --mirror
├── Git LFS migration
├── GitHub API configuration
└── Verification
│
▼
Migration Result
ตัวอย่าง command สำหรับ Git repository:
git clone --mirror "$SOURCE_URL" repo.git
cd repo.git
git remote set-url origin "$GITHUB_REPO_URL"
git push --mirror origin
สำหรับ Git LFS ต้องจัดการแยกต่างหาก เช่น:
git lfs install
git lfs fetch --all
git lfs push --all origin
แล้วจึงใช้ GitHub REST API สำหรับสิ่งที่เป็น GitHub metadata เช่น:
Repository
├── collaborators
├── topics
├── branch protection
├── variables
├── secrets
├── webhooks
├── releases
├── labels
└── GitHub Actions configuration
ถ้าจะทำเป็น Agent / CI Pipeline
สำหรับ architecture ที่เข้ากับงานของคุณมากกว่า ผมจะจัดเป็น:
repository-migrator/
├── agent.yaml
├── schemas/
│ └── migration.schema.json
├── src/
│ ├── planner.py
│ ├── validator.py
│ ├── git_migrator.py
│ ├── github_client.py
│ ├── lfs.py
│ └── verifier.py
├── scripts/
│ ├── migrate.sh
│ └── verify.sh
├── tests/
│ ├── test_validator.py
│ ├── test_planner.py
│ └── test_verifier.py
└── .github/
└── workflows/
└── migration.yml
Pipeline:
PLAN
↓
VALIDATE
↓
CLONE/MIRROR
↓
LFS CHECK
↓
CREATE GITHUB REPO
↓
PUSH MIRROR
↓
CONFIGURE GITHUB
↓
VERIFY
↓
REPORT
และควรให้ agent มีสถานะที่ชัดเจน เช่น:
{
"status": "completed",
"source": "external",
"target": "github",
"branches_verified": true,
"tags_verified": true,
"lfs_verified": true,
"commits_verified": true,
"metadata_verified": true
}
สรุปสั้นที่สุด: อย่า implement POST /repos/{owner}/{repo}/import หรือ endpoint Source Imports ตามเอกสารชุดนี้แล้ว เพราะมันเป็น API ที่ retired ไปแล้ว การทำระบบใหม่ควรใช้ Git mirror/push + GitHub REST API/CLI + verification layer แทน ซึ่งเหมาะกับ CI/CD และ AI-agent workflow ที่คุณกำลังทำอยู่มากกว่า.
สรุป / Summary
เอกสารที่ส่งมานี้เป็น GitHub Source Imports REST API สำหรับให้ระบบเริ่ม import repository จาก Git hosting ภายนอกเข้า GitHub แต่ประเด็นสำคัญคือ API ชุดนี้ถูกยกเลิกแล้ว จึงไม่ควรนำไปสร้าง integration ใหม่ในปี 2026 เพราะมนุษย์เราชอบสร้างระบบบน API ที่ถูกปิดไปแล้วเป็นพิเศษ
The documentation describes GitHub's Source Imports REST API, which was used to import repositories from external Git repositories into GitHub. However, this API has been retired, so it should not be used for a new integration in 2026.
สถานะสำคัญ / Current status
รายการ สถานะ
Source Imports API ❌ Retired
Import status endpoint ❌ Closed April 12, 2024
Update import ❌ Closed
Get commit authors ❌ Closed
Map commit authors ❌ Closed
Personal Access Token เดิมรองรับเฉพาะ PAT classic
GitHub Importer UI ยังเป็นแนวทางที่ GitHub แนะนำสำหรับกรณี import
Automation ใหม่ ควรใช้ Git/GitHub APIs หรือ migration tooling แทน
สิ่งที่ API เดิมเคยทำ / What the old API did
Workflow เดิมประมาณนี้:
External Git Repository
│
▼
Start Import
│
▼
Detect Repository
│
▼
Import Commits
│
├── Map Authors
│
├── Detect Large Files
│
└── Configure Git LFS
│
▼
Push to GitHub
│
▼
Complete
สถานะที่เคยได้รับ เช่น:
detecting
importing
mapping
pushing
complete
และ error states:
auth_failed
detection_needs_auth
detection_found_nothing
detection_found_multiple
error
แนวทางที่ควรใช้ในปี 2026 / Recommended 2026 architecture
ถ้าเป้าหมายของคุณคือสร้างระบบ automated repository migration/import สำหรับ project เช่น CrystalCastleX, pure-agent-dev หรือระบบ agent ของคุณเอง ผมแนะนำ architecture แบบนี้แทน:
Source Repository
│
│ git clone / mirror
▼
Migration Worker
│
├── Validate Git repository
├── Validate branches/tags
├── Validate LFS
├── Validate authors
└── Generate migration report
│
▼
Target GitHub Repository
│
├── git push --mirror
├── Git LFS migration
├── GitHub API configuration
└── Verification
│
▼
Migration Result
ตัวอย่าง command สำหรับ Git repository:
git clone --mirror "$SOURCE_URL" repo.git
cd repo.git
git remote set-url origin "$GITHUB_REPO_URL"
git push --mirror origin
สำหรับ Git LFS ต้องจัดการแยกต่างหาก เช่น:
git lfs install
git lfs fetch --all
git lfs push --all origin
แล้วจึงใช้ GitHub REST API สำหรับสิ่งที่เป็น GitHub metadata เช่น:
Repository
├── collaborators
├── topics
├── branch protection
├── variables
├── secrets
├── webhooks
├── releases
├── labels
└── GitHub Actions configuration
ถ้าจะทำเป็น Agent / CI Pipeline
สำหรับ architecture ที่เข้ากับงานของคุณมากกว่า ผมจะจัดเป็น:
repository-migrator/
├── agent.yaml
├── schemas/
│ └── migration.schema.json
├── src/
│ ├── planner.py
│ ├── validator.py
│ ├── git_migrator.py
│ ├── github_client.py
│ ├── lfs.py
│ └── verifier.py
├── scripts/
│ ├── migrate.sh
│ └── verify.sh
├── tests/
│ ├── test_validator.py
│ ├── test_planner.py
│ └── test_verifier.py
└── .github/
└── workflows/
└── migration.yml
Pipeline:
PLAN
↓
VALIDATE
↓
CLONE/MIRROR
↓
LFS CHECK
↓
CREATE GITHUB REPO
↓
PUSH MIRROR
↓
CONFIGURE GITHUB
↓
VERIFY
↓
REPORT
และควรให้ agent มีสถานะที่ชัดเจน เช่น:
{
"status": "completed",
"source": "external",
"target": "github",
"branches_verified": true,
"tags_verified": true,
"lfs_verified": true,
"commits_verified": true,
"metadata_verified": true
}
สรุปสั้นที่สุด: อย่า implement POST /repos/{owner}/{repo}/import หรือ endpoint Source Imports ตามเอกสารชุดนี้แล้ว เพราะมันเป็น API ที่ retired ไปแล้ว การทำระบบใหม่ควรใช้ Git mirror/push + GitHub REST API/CLI + verification layer แทน ซึ่งเหมาะกับ CI/CD และ AI-agent workflow ที่คุณกำลังทำอยู่มากกว่า.