Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ Before using this action, you must have:

## Usage

Here's an example of how to use the Jules Invoke action in your workflow:
Here's an example of how to use the Jules Invoke action in your workflow.

### Working with Private Repositories

To allow the action to check out a private repository, you must grant it `contents: read` permission in your workflow. The default `${{ github.token }}` passed to the action will then have the necessary scope to access the repository.

```yaml
name: Invoke Jules
Expand All @@ -29,6 +33,8 @@ on:
jobs:
jules-invoke:
runs-on: ubuntu-latest
permissions:
contents: read # Required to checkout private repositories
steps:
- name: Invoke Jules
uses: BeksOmega/jules-action@v1
Expand All @@ -43,6 +49,7 @@ jobs:
| --------------------- | ------------------------------------------------------------------------------------------------------- | --------- |
| `prompt` | **Required.** The prompt to pass to Jules. | `''` |
| `jules_api_key` | **Required.** Your Jules API key. Store this as a secret in your repository settings. | `''` |
| `github_token` | The GitHub token for checking out the repository. The default token is usually sufficient. | `${{ github.token }}` |
| `include_last_commit` | Whether to pass the content of the last commit to Jules. | `false` |
| `include_commit_log` | Whether to pass the commit history to Jules. | `false` |
| `starting_branch` | The branch for Jules to start from. | `'main'` |
Expand Down
6 changes: 6 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@ inputs:
description: 'The Jules API key to use for authentication'
required: true
type: string
github_token:
description: 'The GitHub token to use for authentication'
required: false
type: string
default: ${{ github.token }}

runs:
using: "composite"
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 30
token: ${{ inputs.github_token }}

- name: Create initial prompt
env:
Expand Down