Skip to content

Commit 72792a7

Browse files
authored
Content pipelines workflow fixes (#59746)
1 parent ff12eb9 commit 72792a7

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/content-pipelines.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222
permissions:
2323
contents: write
2424
pull-requests: write
25-
copilot-requests: write
2625

2726
env:
2827
HUSKY: 0
@@ -71,11 +70,11 @@ jobs:
7170
git config user.email "github-actions[bot]@users.noreply.github.com"
7271
7372
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
7574
git checkout "$UPDATE_BRANCH"
7675
git merge origin/main --no-edit || {
7776
echo "Merge conflict with main — resetting branch to main"
78-
git merge --abort
77+
git merge --abort 2>/dev/null || true
7978
git checkout main
8079
git branch -D "$UPDATE_BRANCH"
8180
git push origin --delete "$UPDATE_BRANCH" || true
@@ -89,6 +88,7 @@ jobs:
8988
env:
9089
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
9190
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
COPILOT_GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_COPILOT }}
9292
run: npx tsx src/content-pipelines/scripts/update.ts --id "${{ matrix.id }}"
9393

9494
- name: Commit changes
@@ -131,6 +131,7 @@ jobs:
131131
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'
132132
PR_BODY+="## Review"$'\n\n'
133133
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'
134135
PR_BODY+="* Once satisfied, merge to keep docs up to date"$'\n'
135136
PR_BODY+="* A new PR will be created on the next run if there are further changes"
136137

src/content-pipelines/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ Each content pipeline entry runs in a **single workflow job**. The core logic li
2525

2626
Source docs are **never stored in this repository**. The only state tracked per entry is a single SHA file recording the last-processed commit.
2727

28+
## Modifying results
29+
30+
You can request changes on the automated PR as you would any other PR. If you see content you'd like to change or avoid in future runs, you can try any of three strategies:
31+
32+
1. **For content you want to exclude from future updates:** Add the source heading to the `exclusions` property in [`config.yml`](/src/content-pipelines/config.yml). (The top of the config file has a couple of examples.)
33+
34+
2. **For content that ended up in the wrong article:** Update the `content-mapping` property in [`config.yml`](/src/content-pipelines/config.yml).
35+
36+
3. **If the agent did something else unexpected:** Check whether an update to the [agent instructions](/.github/agents/content-pipeline-update.md) would make sense. (You can always ask Copilot for advice.)
37+
2838
## Running locally
2939

3040
The config file (defined in `src/content-pipelines/config.yml`) contains the important information, so you only need to pass an `--id` to the script:

0 commit comments

Comments
 (0)