Files
time/.github/workflows/mention.yml
T
teahubxyzandClaude Opus 5.5 c2055e85eb
ci / test (push) Successful in 34s
time/worker-run python3 - <<'EOF' p=".github/time/test_time.py" s=open(p).read() old='import concurrent.futures as c
time: every write but comments and statuses goes out as the time bot
Gitea 1.24 also refuses the Actions identity label edits (removing a label is a 500), which crashed
promote_next and stalled the queue. gh() now uses TIME_TOKEN for every write except comments (Time's
beats are gitea-actions' comments) and commit statuses; the time user never counts as trusted and
mention replies ignore it; astra.yml gets TIME_TOKEN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017fTCFiw6ohysUDcWoPsTys
2026-10-14 14:02:51 -07:00

38 lines
1.5 KiB
YAML

name: mention
# @seat [model] [effort] in an issue, PR or comment -> that seat replies in the thread.
on:
issues:
types: [opened]
issue_comment:
types: [created]
permissions:
contents: read
issues: write
pull-requests: write
concurrency:
group: mention-${{ github.event.issue.number }}
cancel-in-progress: false
jobs:
reply:
# cheap filter before a runner spins up: a mention, and not Time's own comment (Gitea fires events for the Actions
# token's writes). Who may spend the seats' credits is checked in time.py (collaborator permission); Gitea has no
# author_association in the event.
if: >-
contains(github.event.comment.body || github.event.issue.body, '@') &&
(github.event.comment.user.login || github.event.issue.user.login) != 'gitea-actions' &&
(github.event.comment.user.login || github.event.issue.user.login) != 'time'
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v5
with:
sparse-checkout: .github/time
- run: python3 .github/time/time.py mention
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VENICE_API_KEY: ${{ secrets.VENICE_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
TIME_TRUSTED: ${{ vars.TIME_TRUSTED }} # org owners etc.; collaborators are trusted without being listed
TIME_DAILY_USD: ${{ vars.TIME_DAILY_USD }}
TIME_MONTHLY_USD: ${{ vars.TIME_MONTHLY_USD }}