Add initial files

This commit is contained in:
2026-07-09 08:24:27 +09:00
commit e53edf1fbb
3 changed files with 74 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
You are Codex running inside Gitea Actions.
First read `.codex-bot/context.md`. Treat the triggering comment body below as
the user's exact instruction.
Write your final report to stdout. It will be posted back to Gitea as a comment
automatically after Codex exits.
Install missing tools yourself when needed, including Rust, uv, Node, Deno, or
system packages.
Prefer minimal, correct changes. Run relevant checks or tests if practical.
Commit your changes locally. Do not expose secrets. Finish by reporting what
changed and what tests ran.
The triggering comment body is below.
---
${COMMENT_BODY}
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
git config --global user.name bot
git config --global user.email noreply@capsulizers.com
FINAL_PROMPT="$(envsubst < "${ACTION_PATH}/scripts/prompt.md")"
OUTPUT_FILE="$(mktemp)"
set +e
codex exec \
--full-auto \
--dangerously-bypass-approvals-and-sandbox \
"${FINAL_PROMPT}" > "${OUTPUT_FILE}" 2>&1
CODEX_STATUS="${?}"
set -e
COMMENT_JSON="$(jq -n --rawfile body "${OUTPUT_FILE}" '{body: $body}')"
curl --fail-with-body --silent --show-error \
-X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
--data "${COMMENT_JSON}" \
"${GITEA_API_URL}/repos/${GITEA_REPOSITORY}/issues/${ISSUE_INDEX}/comments"
exit "${CODEX_STATUS}"