feat(prd-1): implement M1 - platform detection and action.yml modifications
- Add src/platform/detector.ts with 3-tier detection (explicit input, FORGEJO env var, GITHUB_SERVER_URL heuristic) - Add 'platform' input to action.yml (auto/github/forgejo) - Add 'Detect Platform' shell step as first composite action step - Split bun installation: oven-sh/setup-bun for GitHub, curl fallback for Forgejo runners - Condition 'Revoke app token' step to skip on Forgejo - Pass resolved PLATFORM env var to run step - Add 14 unit tests covering all detection paths Progress: M1 complete (1/9 milestones) - M2 and M5 now unblocked Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
411eb3d69d
commit
72f11f320c
4 files changed
+165
-3
No files matched your search
@@ -228,7 +228,7 @@ The upstream repo has 13 workflows in `.github/workflows/`. Strategy:
|
||||
|
||||
### Phase 1 - Foundation (parallel, no dependencies)
|
||||
|
||||
- [ ] **M1: Platform detection + `action.yml` modifications** — Add `platform` input to `action.yml`. Create `src/platform/detector.ts` with explicit input + env-var auto-detection. Add conditional logic to skip "Revoke app token" step on Forgejo. Fix bun installation to handle Forgejo runners (direct curl fallback).
|
||||
- [x] **M1: Platform detection + `action.yml` modifications** — Add `platform` input to `action.yml`. Create `src/platform/detector.ts` with explicit input + env-var auto-detection. Add conditional logic to skip "Revoke app token" step on Forgejo. Fix bun installation to handle Forgejo runners (direct curl fallback).
|
||||
- Files: `action.yml` (MODIFIED), `src/platform/detector.ts` (NEW)
|
||||
- Success: `detectPlatform()` returns "forgejo" in Forgejo runner, "github" in GitHub runner. `action.yml` doesn't error on Forgejo.
|
||||
|
||||
|
||||
Reference in new issue
Block a user