Skip to content

Commit

Permalink
mention github_token secret
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jun 4, 2024
1 parent 32ebe75 commit 7c15d2d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/src/content/docs/getting-started/automating-scripts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,17 @@ Use the `out-trace` flag to output the trace to the summary file, `$GITHUB_STEP_
If your GitHub Action is triggered by a [pull request event](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request),
you can use the following flags to add comments: description, conversation and reviews.

In order to create comments, the workflow must have the `pull-requests: write` [permission](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs).
In order to create comments,
the workflow must have the `pull-requests: write` [permission](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)
and the `GITHUB_TOKEN` secret must be passed to the script.

```yaml
permissions:
pull-requests: write
...
- run: npx --yes genaiscript run ...
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

### Diff
Expand Down

0 comments on commit 7c15d2d

Please sign in to comment.