Files
time/.github/workflows/mention.yml
T
2026-10-14 19:31:41 +00:00

37 lines
1.4 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'
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 }}