e56ea246bf
Centralize ordered bot profiles and encrypted credentials in `bot-agents`. - Exposes one action input: `master-key`. - Uses Gitea’s automatic job token internally; dependent repositories provide no author/reviewer/profile inputs. - Keeps encrypted Claude and reviewer credentials in `profiles.yml`; tokenless Codex uses its persisted subscription login. - Falls back only on recognized quota exhaustion, with a distinct UID/home per profile and descendant cleanup before fallback. - Separates decryption, agent execution, and reviewer posting so privileged credentials never enter an agent process. - Installs `obra/superpowers` with the standard Skills CLI; removes custom discovery code. - Adds root-level isolation, rollback, symlink, fallback, posting, YAML, and self-workflow CI coverage. Checks: formatting, lint, all entrypoint type checks, 35 tests as root, diff check, secret scan, and repository diagnostics. Reviewed-on: #14 Co-authored-by: Danny Kim <temeddix@gmail.com> Co-committed-by: Danny Kim <temeddix@gmail.com>
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: Agents
|
|
run-name: >-
|
|
AI bot at
|
|
#${{ gitea.event.issue.number || gitea.event.pull_request.number }}
|
|
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
pull_request:
|
|
types: [opened, review_requested]
|
|
issue_comment:
|
|
types: [created]
|
|
pull_request_review_comment:
|
|
types: [created]
|
|
|
|
concurrency:
|
|
group: >-
|
|
agents-${{ gitea.event.sender.login == 'bot' && gitea.run_id ||
|
|
gitea.event.issue.number || gitea.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
agent:
|
|
if: >-
|
|
gitea.actor != 'bot' && gitea.event.sender.login != 'bot' &&
|
|
((gitea.event_name == 'issues' &&
|
|
contains(gitea.event.issue.body, '@bot')) ||
|
|
(gitea.event_name == 'pull_request' &&
|
|
((gitea.event.action == 'opened' &&
|
|
contains(gitea.event.pull_request.body, '@bot')) ||
|
|
gitea.event.requested_reviewer.login == 'bot')) ||
|
|
(gitea.event_name == 'issue_comment' &&
|
|
contains(gitea.event.comment.body, '@bot')) ||
|
|
(gitea.event_name == 'pull_request_review_comment' &&
|
|
contains(gitea.event.review.content, '@bot')))
|
|
permissions:
|
|
code: write
|
|
issues: write
|
|
pull-requests: write
|
|
runs-on: self-hosted
|
|
container:
|
|
volumes:
|
|
- bot-home:/root
|
|
steps:
|
|
- name: Run AI bot
|
|
uses: https://git.capsulizers.com/commons/bot-agents@main
|
|
with:
|
|
master-key: ${{ secrets.BOT_AGENTS_MASTER_KEY }}
|