Skip to content

[codex] set default review prompt from ralphplus workflow#1

Merged
Svtter merged 1 commit into
mainfrom
codex/default-review-prompt-from-ralphplus
Apr 2, 2026
Merged

[codex] set default review prompt from ralphplus workflow#1
Svtter merged 1 commit into
mainfrom
codex/default-review-prompt-from-ralphplus

Conversation

@Svtter

@Svtter Svtter commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • set github-run-opencode input prompt.default to the same review prompt used in Svtter/ralphplus/.github/workflows/opencode-review.yml
  • keep existing override behavior: user-provided prompt still takes precedence
  • update README common inputs table to reflect that prompt now has a built-in default template

Why

  • when consumers omit prompt, they now get a consistent review instruction set instead of an empty prompt

Validation

  • bash tests/test.sh
  • compared extracted PROMPT block from ralphplus workflow with github-run-opencode/action.yml default block; exact match confirmed

@Svtter Svtter marked this pull request as ready for review April 2, 2026 02:51
@Svtter Svtter merged commit bbb6720 into main Apr 2, 2026
2 checks passed
Svtter added a commit that referenced this pull request May 26, 2026
- Remove dead httpRequest code and unused http/https imports (阻塞项 #1)
- Reverse diff fetch priority: pre-fetched file first, platform fetch as
  fallback to avoid duplicate API calls on GitHub (阻塞项 #2)
- Fix redundant Python exception catches (Exception covers subclasses)
- Use get_env() in detect_platform() for consistency
- Add HTTPS warning for GITEA_API_URL using plain HTTP
- Validate GITHUB_REPOSITORY format before API calls
- Lazy-cache hasTea() result to avoid repeated which calls
- Add pagination support for Gitea comment cleanup
- Revert tsup externals (https/http no longer imported)
- Remove duplicate empty-diff check in index.ts
Svtter added a commit that referenced this pull request May 27, 2026
TS (platform.ts):
- Cache detectPlatform() result to avoid repeated env reads (#6)
- getRepo() returns empty string + warn instead of throw (#5)
- fetchAllGiteaComments() capped at MAX_PAGES=20 (#1)
- getGiteaToken() checks both GITEA_TOKEN and GITHUB_RUN_OPENCODE_GITEA_TOKEN (#13)
- Add /* ignore */ comments to empty catch blocks (#11)

Python (run-github-opencode.py):
- Use specific exception types: (TimeoutExpired, JSONDecodeError) not bare Exception (#2)
- Add HTTP plaintext warning for GITEA_API_URL (#3)
- Validate repo/pr format before URL construction (#4)
- Add pagination for Gitea comment listing with max_pages=20 (#1)
- Unify token lookup to GITEA_TOKEN only (#13)
Svtter added a commit that referenced this pull request May 27, 2026
- Restore error log in GitHub cleanup catch block (#1)
- Add --repo to tea pulls diff call (#2)
- Python Gitea token fallback: check both GITEA_TOKEN and GITHUB_RUN_OPENCODE_GITEA_TOKEN (#4)
Svtter added a commit that referenced this pull request May 27, 2026
* feat: add Gitea CI compatibility via platform abstraction layer

- New platform.ts: auto-detect GitHub/Gitea via GITEA_API_URL env var
- Unified interfaces for PR diff fetch, comment posting, error comment cleanup
- Gitea: tea CLI (preferred) → curl REST API fallback
- GitHub: unchanged, zero-impact on existing workflows
- comment.ts refactored to thin proxy over platform.ts
- index.ts: platform-aware diff fetch with pre-fetched file fallback
- action.yml (multi-review, review): new gitea-token input
- Python: detect_platform() + Gitea error comment cleanup

Closes #55

* fix: address AI code review feedback

- Remove dead httpRequest code and unused http/https imports (阻塞项 #1)
- Reverse diff fetch priority: pre-fetched file first, platform fetch as
  fallback to avoid duplicate API calls on GitHub (阻塞项 #2)
- Fix redundant Python exception catches (Exception covers subclasses)
- Use get_env() in detect_platform() for consistency
- Add HTTPS warning for GITEA_API_URL using plain HTTP
- Validate GITHUB_REPOSITORY format before API calls
- Lazy-cache hasTea() result to avoid repeated which calls
- Add pagination support for Gitea comment cleanup
- Revert tsup externals (https/http no longer imported)
- Remove duplicate empty-diff check in index.ts

* fix: address second round AI code review feedback

TS (platform.ts):
- Cache detectPlatform() result to avoid repeated env reads (#6)
- getRepo() returns empty string + warn instead of throw (#5)
- fetchAllGiteaComments() capped at MAX_PAGES=20 (#1)
- getGiteaToken() checks both GITEA_TOKEN and GITHUB_RUN_OPENCODE_GITEA_TOKEN (#13)
- Add /* ignore */ comments to empty catch blocks (#11)

Python (run-github-opencode.py):
- Use specific exception types: (TimeoutExpired, JSONDecodeError) not bare Exception (#2)
- Add HTTP plaintext warning for GITEA_API_URL (#3)
- Validate repo/pr format before URL construction (#4)
- Add pagination for Gitea comment listing with max_pages=20 (#1)
- Unify token lookup to GITEA_TOKEN only (#13)

* fix: address third round review feedback

- Restore error log in GitHub cleanup catch block (#1)
- Add --repo to tea pulls diff call (#2)
- Python Gitea token fallback: check both GITEA_TOKEN and GITHUB_RUN_OPENCODE_GITEA_TOKEN (#4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant