Files
time/.github/workflows/mention.yml
T

33 lines
1.2 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, not from a bot, and only from people with a say in this repo
# (public repo: strangers can comment, but must not be able to spend the seats' model credits)
if: >-
contains(github.event.comment.body || github.event.issue.body, '@') &&
(github.event.comment.user.type || github.event.issue.user.type) != 'Bot' &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association || github.event.issue.author_association)
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 }}