name: Auto-Fix Bugs on: issues: types: [labeled] jobs: fix-bug: # Only run when the 'bug' label is added # Note you can also get Jules to trigger # on repos by adding the 'jules' label, # but this example lets you manage the prompt # explicitly, add preamble, etc. if: github.event.label.name == 'bug' runs-on: ubuntu-latest permissions: contents: read issues: read steps: - name: Invoke Jules # SECURITY: Only allow trusted users to trigger Jules if: ${{ contains(fromJSON('["your-username", "trusted-collaborator"]'), github.event.issue.user.login) }} uses: google-labs-code/jules-invoke@v1 with: prompt: | Please diagnose and fix the following bug: ## ${{ github.event.issue.title }} ${{ github.event.issue.body }} Debugging Process: 1. **Analysis** - Review the bug report and identify the root cause 2. **Diagnosis** - Trace the issue through the codebase 3. **Fix** - Implement a minimal, targeted fix 4. **Testing** - Add a regression test that would have caught this bug 5. **Documentation** - Add comments explaining the fix Please provide: - Clear explanation of the root cause - The complete fix with all necessary changes - Test cases to prevent regression jules_api_key: ${{ secrets.JULES_API_KEY }} starting_branch: 'main'