|
| 1 | +name: Auggie Bot |
| 2 | + |
| 3 | +on: |
| 4 | + issue_comment: |
| 5 | + types: [created] |
| 6 | + pull_request_review_comment: |
| 7 | + types: [created] |
| 8 | + |
| 9 | +permissions: |
| 10 | + contents: write |
| 11 | + issues: write |
| 12 | + pull-requests: write |
| 13 | + |
| 14 | +jobs: |
| 15 | + documentation-generation: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + # Only run if comment contains @update-docs |
| 18 | + # Only allow trusted actors (org members, collaborators, or repo owner) to trigger |
| 19 | + if: | |
| 20 | + ( |
| 21 | + github.event.comment.author_association == 'OWNER' || |
| 22 | + github.event.comment.author_association == 'MEMBER' || |
| 23 | + github.event.comment.author_association == 'COLLABORATOR' |
| 24 | + ) && |
| 25 | + contains(github.event.comment.body, '@update-docs') |
| 26 | +
|
| 27 | + steps: |
| 28 | + - name: Checkout code |
| 29 | + uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + fetch-depth: 0 |
| 32 | + |
| 33 | + - name: Checkout docs repository |
| 34 | + uses: actions/checkout@v4 |
| 35 | + with: |
| 36 | + repository: augmentcode/docs |
| 37 | + path: docs |
| 38 | + token: ${{ secrets.TULGA_GITHUB_PAT_TOKEN }} |
| 39 | + fetch-depth: 0 |
| 40 | + |
| 41 | + - name: Configure git for docs repository |
| 42 | + working-directory: docs |
| 43 | + run: | |
| 44 | + git config user.email "auggie[bot]@users.noreply.github.com" |
| 45 | + git config user.name "auggie[bot]" |
| 46 | + git remote set-url origin https://x-access-token:${{ secrets.TULGA_GITHUB_PAT_TOKEN }}@github.com/augmentcode/docs.git |
| 47 | +
|
| 48 | + - name: Run Augment |
| 49 | + uses: augmentcode/augment-action@main |
| 50 | + with: |
| 51 | + augment_api_key: ${{ secrets.AUGMENT_API_KEY }} |
| 52 | + augment_api_url: ${{ vars.AUGMENT_API_URL }} |
| 53 | + workspace_root: ${{ github.workspace }} |
| 54 | + prompt: | |
| 55 | + You are a documentation maintenance assistant. Your task is to ensure documentation stays synchronized with code changes. |
| 56 | +
|
| 57 | + ## Workspace Structure |
| 58 | + Your workspace contains TWO repositories: |
| 59 | + - **Source repository** (`augmentcode/context-connectors`): Located at the workspace root (`.`) |
| 60 | + - Use this to READ code changes and understand what was modified |
| 61 | + - **Documentation repository** (`augmentcode/docs`): Located at `./docs/` |
| 62 | + - Use this to WRITE documentation updates |
| 63 | + - All commits, branches, and PRs must be created here |
| 64 | +
|
| 65 | + ## Triggering PR |
| 66 | + - PR #${{ github.event.issue.number }} in `augmentcode/context-connectors` |
| 67 | +
|
| 68 | + ## Instructions |
| 69 | +
|
| 70 | + 1. **Analyze the PR**: Read the code changes from the source repository (workspace root) to understand what functionality was added, modified, or removed. You can also use the GitHub API to get PR details. |
| 71 | +
|
| 72 | + 2. **Identify documentation impact**: Determine if the changes affect: |
| 73 | + - API references or method signatures |
| 74 | + - Configuration options |
| 75 | + - Usage examples or tutorials |
| 76 | + - Installation or setup instructions |
| 77 | + - Breaking changes or deprecations |
| 78 | +
|
| 79 | + 3. **Update documentation**: If changes are needed, update the relevant files in the `docs/` directory (the docs repository). |
| 80 | +
|
| 81 | + 4. **Create a PR in the docs repository**: |
| 82 | + - Change directory to `docs/` before running git commands |
| 83 | + - Create a new branch: `git checkout -b docs/update-from-context-connectors-pr-${{ github.event.issue.number }}` |
| 84 | + - Stage and commit your changes |
| 85 | + - Push the branch: `git push -u origin docs/update-from-context-connectors-pr-${{ github.event.issue.number }}` |
| 86 | + - Create a pull request in `augmentcode/docs` using the GitHub API |
| 87 | + - Reference the source PR: "Documentation updates for augmentcode/context-connectors#${{ github.event.issue.number }}" |
| 88 | + - Comment on the source PR with the docs PR link |
| 89 | +
|
| 90 | + 5. **No changes needed**: If the PR contains internal refactoring, test-only changes, or other modifications that don't affect user-facing documentation, comment that no documentation updates are required and briefly explain why. |
0 commit comments