Rewrite the runner in TypeScript
Check / deno (pull_request) Successful in 45s

This commit is contained in:
2026-09-13 23:09:53 +09:00
parent 7182a6f8f4
commit e65ac772f6
7 changed files with 243 additions and 135 deletions
+9 -9
View File
@@ -7,13 +7,15 @@ inputs:
required: true
author-token:
description: >-
Gitea token of the account that commits, pushes, and opens pull requests.
The agent sees it as `GITEA_TOKEN`.
Gitea token of the account that commits, pushes, and opens pull requests,
with the `read:user`, `write:issue`, and `write:repository` scopes. The
agent sees it as `GITEA_TOKEN`.
required: true
reviewer-token:
description: >-
Gitea token of the bot account that posts comments and pull request
reviews. Never exposed to the agent, so it must differ from the author.
reviews, with the `write:issue` and `write:repository` scopes. Never
exposed to the agent, so it must differ from the author.
required: true
bot-token:
description: API key or token for the selected bot
@@ -25,20 +27,18 @@ runs:
# This step assumes this is `node:24-bookworm` container.
- name: Install dependencies
shell: bash
run: |
apt-get update
apt-get install -y --no-install-recommends gettext-base jq ansifilter
npm install -g @openai/codex @anthropic-ai/claude-code
run: npm install -g @openai/codex @anthropic-ai/claude-code deno
- name: Run bot
shell: bash
run: bash "${ACTION_PATH}/scripts/run-${{ inputs.bot-type }}.sh"
run: deno run -A "${ACTION_PATH}/run.ts"
env:
ACTION_PATH: ${{ gitea.action_path }}
BOT_TYPE: ${{ inputs.bot-type }}
BOT_TOKEN: ${{ inputs.bot-token }}
GITEA_API_URL: ${{ gitea.api_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
GITEA_TOKEN: ${{ inputs.author-token }}
REVIEWER_TOKEN: ${{ inputs.reviewer-token }}
BOT_TOKEN: ${{ inputs.bot-token }}
EVENT_NAME: ${{ gitea.event_name }}
ISSUE_INDEX: ${{ gitea.event.issue.number || gitea.event.pull_request.number }}
COMMENT: ${{ toJSON(gitea.event.comment || gitea.event.review) }}