Skip to content

Commit 3a5aea7

Browse files
committed
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)
1 parent a481280 commit 3a5aea7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/sisyphus-agent.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ jobs:
1515
agent:
1616
runs-on: ubuntu-latest
1717
# @sisyphus-dev-ai mention only (maintainers, exclude self)
18-
if: |
18+
if: >-
1919
github.event_name == 'workflow_dispatch' ||
20-
(contains(github.event.comment.body, '@sisyphus-dev-ai') &&
21-
github.event.comment.user.login != 'sisyphus-dev-ai' &&
22-
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association))
20+
(github.event_name == 'issue_comment' &&
21+
contains(github.event.comment.body || '', '@sisyphus-dev-ai') &&
22+
(github.event.comment.user.login || '') != 'sisyphus-dev-ai' &&
23+
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association || ''))
2324
2425
permissions:
2526
contents: read

0 commit comments

Comments
 (0)