Skip to content

Commit 8901824

Browse files
Merge branch 'main' into license-qualifier-search
2 parents 82e38e1 + 8116a57 commit 8901824

File tree

150 files changed

+3814
-1307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+3814
-1307
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
# to native line endings on checkout.
55
*.md text diff=markdown
66
*.json.br filter=lfs diff=lfs merge=lfs -text
7+
.github/workflows/*.lock.yml linguist-generated=true merge=ours

.github/actions/get-changed-files/action.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/actions/get-changed-files/get-changed-files.sh

Lines changed: 0 additions & 204 deletions
This file was deleted.

.github/aw/actions-lock.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v8": {
4+
"repo": "actions/github-script",
5+
"version": "v8",
6+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7+
},
8+
"github/gh-aw/actions/setup@v0.57.1": {
9+
"repo": "github/gh-aw/actions/setup",
10+
"version": "v0.57.1",
11+
"sha": "36e5751f7c3d40ec9df8f44c0252b7bfabfc4dd6"
12+
}
13+
}
14+
}

.github/workflows/content-lint-markdown.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,23 @@ jobs:
3030

3131
- name: Get changed content/data files
3232
id: changed_files
33-
uses: ./.github/actions/get-changed-files
33+
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
3434
with:
3535
files: |
3636
content/**
3737
data/**
3838
3939
- name: Print content linter annotations if changed content/data files
40-
if: steps.changed_files.outputs.filtered_changed_files
40+
if: steps.changed_files.outputs.any_modified == 'true'
4141
env:
42-
# Make it an environment variable so that its value doesn't need to be escaped.
43-
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
44-
CHANGED_FILES: |-
45-
${{ steps.changed_files.outputs.filtered_changed_files }}
42+
CHANGED_FILES: ${{ steps.changed_files.outputs.all_modified_files }}
4643
# If there are errors, using `--print-annotations` will make it
4744
# so it does *not* exit non-zero.
4845
# This is so that all warnings and errors are printed.
4946
run: npm run lint-content -- --print-annotations --paths $CHANGED_FILES
5047

5148
- name: Run content linter if changed content/data files
52-
if: steps.changed_files.outputs.filtered_changed_files
49+
if: steps.changed_files.outputs.any_modified == 'true'
5350
env:
54-
# Make it an environment variable so that its value doesn't need to be escaped.
55-
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
56-
CHANGED_FILES: |-
57-
${{ steps.changed_files.outputs.filtered_changed_files }}
51+
CHANGED_FILES: ${{ steps.changed_files.outputs.all_modified_files }}
5852
run: npm run lint-content -- --errors-only --paths $CHANGED_FILES

.github/workflows/content-pipelines.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ jobs:
9191
fi
9292
9393
- name: Run content pipeline update script
94-
id: update
9594
env:
9695
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
9796
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -128,32 +127,31 @@ jobs:
128127
git push origin "$UPDATE_BRANCH"
129128
fi
130129
130+
- name: Read source repo info from config
131+
id: source-info
132+
env:
133+
PIPELINE_ID: ${{ matrix.id }}
134+
run: |
135+
SOURCE_REPO=$(yq -r ".[\"${PIPELINE_ID}\"].\"source-repo\"" src/content-pipelines/config.yml)
136+
SOURCE_PATH=$(yq -r ".[\"${PIPELINE_ID}\"].\"source-path\"" src/content-pipelines/config.yml)
137+
echo "source_repo=$SOURCE_REPO" >> "$GITHUB_OUTPUT"
138+
echo "source_path=$SOURCE_PATH" >> "$GITHUB_OUTPUT"
139+
131140
- name: Create or update PR
132141
if: steps.commit.outputs.has_changes == 'true'
133142
env:
134143
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
135144
UPDATE_BRANCH: ${{ steps.branch.outputs.update_branch }}
136145
PIPELINE_ID: ${{ matrix.id }}
137-
COMPARE_URL: ${{ steps.update.outputs.compare_url }}
138-
SHORT_RANGE: ${{ steps.update.outputs.short_range }}
146+
SOURCE_REPO: ${{ steps.source-info.outputs.source_repo }}
147+
SOURCE_PATH: ${{ steps.source-info.outputs.source_path }}
139148
run: |
140149
PR_NUMBER="${{ steps.check-pr.outputs.pr_number }}"
141150
PR_TITLE="docs: update ${PIPELINE_ID} content from source docs"
142-
NEW_ITEM="* [\`${SHORT_RANGE}\`](${COMPARE_URL})"
151+
SOURCE_LINK="See the [upstream repo](https://github.com/${SOURCE_REPO}/tree/main/${SOURCE_PATH}) for changes that triggered this update."
143152
144153
if [ -n "$PR_NUMBER" ]; then
145-
echo "PR #$PR_NUMBER already exists — appending source changes to body"
146-
147-
EXISTING_BODY=$(gh pr view "$PR_NUMBER" --json body --jq '.body')
148-
149-
# Append a new bullet before the SOURCE_CHANGES end marker
150-
# Uses bash parameter expansion for safe literal string replacement
151-
MARKER="<!-- /SOURCE_CHANGES -->"
152-
INSERTION="${NEW_ITEM}"$'\n'
153-
INSERTION+="${MARKER}"
154-
UPDATED_BODY="${EXISTING_BODY/$MARKER/$INSERTION}"
155-
156-
gh pr edit "$PR_NUMBER" --body "$UPDATED_BODY"
154+
echo "PR #$PR_NUMBER already exists"
157155
158156
echo "Ensuring PR #$PR_NUMBER is marked ready for review"
159157
gh pr ready "$PR_NUMBER" || echo "Unable to mark PR #$PR_NUMBER as ready (it may already be ready)"
@@ -166,10 +164,7 @@ jobs:
166164
PR_BODY+="## What this does"$'\n\n'
167165
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'
168166
PR_BODY+="## Source changes"$'\n\n'
169-
PR_BODY+="Changes in the source repo that triggered this update:"$'\n\n'
170-
PR_BODY+="<!-- SOURCE_CHANGES -->"$'\n'
171-
PR_BODY+="${NEW_ITEM}"$'\n'
172-
PR_BODY+="<!-- /SOURCE_CHANGES -->"$'\n\n'
167+
PR_BODY+="${SOURCE_LINK}"$'\n\n'
173168
PR_BODY+="## Review"$'\n\n'
174169
PR_BODY+="* Review each commit for accuracy — the agent uses AI, so spot-check important changes"$'\n'
175170
PR_BODY+="* To adjust agent behavior, see [Modifying results](${{ github.server_url }}/${{ github.repository }}/blob/main/src/content-pipelines/README.md#modifying-results)"$'\n'
@@ -181,7 +176,7 @@ jobs:
181176
--body "$PR_BODY" \
182177
--base main \
183178
--head "$UPDATE_BRANCH" \
184-
--label "workflow-generated,content-pipeline-update,ready-for-doc-review"
179+
--label "workflow-generated,content-pipeline-update,ready-for-doc-review,skip FR board"
185180
fi
186181
187182
- uses: ./.github/actions/slack-alert

0 commit comments

Comments
 (0)