Skip to content

Commit e37afd3

Browse files
jeremyederclaude
andcommitted
Add ambient-action workflow for issue comment automation
Triggers an ACP session when org members comment @ambient on issues. Restricted to OWNER and MEMBER author associations for security. Workflow token scoped to contents: read per least-privilege principle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4717397 commit e37afd3

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/ambient.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Ambient
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
ambient:
12+
if: >-
13+
startsWith(github.event.comment.body, '@ambient') &&
14+
contains(fromJSON('["OWNER","MEMBER"]'), github.event.comment.author_association)
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: ambient-code/ambient-action@v2
18+
with:
19+
api-url: ${{ secrets.AMBIENT_API_URL }}
20+
api-token: ${{ secrets.AMBIENT_BOT_TOKEN }}
21+
project: gps-ambient-action
22+
prompt: ${{ github.event.comment.body }}
23+
display-name: "Issue #${{ github.event.issue.number }}"
24+
repos: '[{"url": "https://github.com/${{ github.repository }}", "branch": "main", "autoPush": true}]'
25+
labels: '{"source": "github-issue", "issue": "${{ github.event.issue.number }}"}'

0 commit comments

Comments
 (0)