fix(ci): harden sisyphus-agent workflow condition for push event safety

- Add explicit `github.event_name == 'issue_comment'` check
- Add null coalescing (`|| ''`) for safe property access
- Use `>-` folded block scalar for better YAML parsing

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2026-01-03 11:40:56 +09:00
parent a4812801b4
commit 3a5aea7f4b

View File

@@ -15,11 +15,12 @@ jobs:
agent:
runs-on: ubuntu-latest
# @sisyphus-dev-ai mention only (maintainers, exclude self)
if: |
if: >-
github.event_name == 'workflow_dispatch' ||
(contains(github.event.comment.body, '@sisyphus-dev-ai') &&
github.event.comment.user.login != 'sisyphus-dev-ai' &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association))
(github.event_name == 'issue_comment' &&
contains(github.event.comment.body || '', '@sisyphus-dev-ai') &&
(github.event.comment.user.login || '') != 'sisyphus-dev-ai' &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association || ''))
permissions:
contents: read