You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -240,6 +240,47 @@ jobs:
240
240
security_scan_days: 7
241
241
```
242
242
243
+
## Authentication
244
+
245
+
Droid needs two separate kinds of access: permission to run Droid, and permission to post on your pull requests. You set them up independently.
246
+
247
+
### 1. Factory API key (run Droid)
248
+
249
+
Droid runs using your Factory API key. Create one at [app.factory.ai/settings/api-keys](https://app.factory.ai/settings/api-keys) and save it as a `FACTORY_API_KEY` secret in your repository or organization. Pass it to the action on every run:
250
+
251
+
```yaml
252
+
- uses: Factory-AI/droid-action@main
253
+
with:
254
+
factory_api_key: ${{ secrets.FACTORY_API_KEY }}
255
+
```
256
+
257
+
This input is required.
258
+
259
+
### 2. GitHub access (post reviews)
260
+
261
+
To leave comments and approvals on your PRs, Droid needs a GitHub token. There are two ways to provide one:
262
+
263
+
- **Factory Droid GitHub App (default, recommended).** If you don't pass a token, the action securely requests one for the installed Factory Droid GitHub App. For most teams this is all you need: install the app on your repositories from [app.factory.ai/settings/organization](https://app.factory.ai/settings/organization). It requires the `id-token: write` permission so the action can request the token:
264
+
265
+
```yaml
266
+
permissions:
267
+
contents: write
268
+
pull-requests: write
269
+
issues: write
270
+
id-token: write # required for GitHub App auth
271
+
```
272
+
273
+
- **Your own token (override).** If you'd rather use a personal access token or your own GitHub App — for example on GitHub Enterprise, or to control which account posts comments — pass it as `github_token`. When set, Droid uses it directly and skips the app. The token needs write access to pull requests and repository contents.
274
+
275
+
```yaml
276
+
- uses: Factory-AI/droid-action@main
277
+
with:
278
+
factory_api_key: ${{ secrets.FACTORY_API_KEY }}
279
+
github_token: ${{ secrets.MY_GITHUB_TOKEN }}
280
+
```
281
+
282
+
> On GitLab, the same two pieces apply: set `FACTORY_API_KEY` and `GITLAB_TOKEN` as CI/CD variables. See [`docs/gitlab-setup.md`](docs/gitlab-setup.md).
0 commit comments