|
22 | 22 | permissions: |
23 | 23 | contents: write |
24 | 24 | pull-requests: write |
25 | | - copilot-requests: write |
26 | 25 |
|
27 | 26 | env: |
28 | 27 | HUSKY: 0 |
@@ -71,11 +70,11 @@ jobs: |
71 | 70 | git config user.email "github-actions[bot]@users.noreply.github.com" |
72 | 71 |
|
73 | 72 | if git ls-remote --exit-code --heads origin "$UPDATE_BRANCH" > /dev/null 2>&1; then |
74 | | - git fetch origin "$UPDATE_BRANCH" |
| 73 | + git fetch origin "$UPDATE_BRANCH" main |
75 | 74 | git checkout "$UPDATE_BRANCH" |
76 | 75 | git merge origin/main --no-edit || { |
77 | 76 | echo "Merge conflict with main — resetting branch to main" |
78 | | - git merge --abort |
| 77 | + git merge --abort 2>/dev/null || true |
79 | 78 | git checkout main |
80 | 79 | git branch -D "$UPDATE_BRANCH" |
81 | 80 | git push origin --delete "$UPDATE_BRANCH" || true |
|
89 | 88 | env: |
90 | 89 | GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }} |
91 | 90 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 91 | + COPILOT_GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_COPILOT }} |
92 | 92 | run: npx tsx src/content-pipelines/scripts/update.ts --id "${{ matrix.id }}" |
93 | 93 |
|
94 | 94 | - name: Commit changes |
@@ -131,6 +131,7 @@ jobs: |
131 | 131 | PR_BODY+="Runs the \`content-pipeline-update\` agent (${PIPELINE_ID}) against the latest source docs and updates official articles under \`content/\` that have fallen out of sync."$'\n\n' |
132 | 132 | PR_BODY+="## Review"$'\n\n' |
133 | 133 | PR_BODY+="* Review each commit for accuracy — the agent uses AI, so spot-check important changes"$'\n' |
| 134 | + PR_BODY+="* To adjust agent behavior, see [Modifying results](${{ github.server_url }}/${{ github.repository }}/blob/main/src/content-pipelines/README.md#modifying-results)"$'\n' |
134 | 135 | PR_BODY+="* Once satisfied, merge to keep docs up to date"$'\n' |
135 | 136 | PR_BODY+="* A new PR will be created on the next run if there are further changes" |
136 | 137 |
|
|
0 commit comments