You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DEFAULT_BRANCH=$(gh api "repos/$REPO" --jq '.default_branch')
219
235
220
236
PR_BODY="The [sync-llms-txt workflow]($RUN_URL) generated this PR.
221
237
222
-
Updates \`public/llms.txt\`, served at https://github.com/llms.txt. Built in docs-internal from the page catalog and popularity data using \`data/llms-txt/config-default.yml\` + \`config-monolith.yml\`.
238
+
Updates the static generated files \`public/llms.txt\` and \`public/llms-full.txt\`, served at https://github.com/llms.txt and https://github.com/llms-full.txt. Both are built in docs-internal from the page catalog and popularity data using \`data/llms-txt/config-default.yml\` + \`config-monolith.yml\`.
239
+
240
+
Initially, \`llms-full.txt\` is intentionally an exact duplicate of \`llms.txt\`.
223
241
224
242
No feature flags. Static file in \`public/\`, no code changes.
225
243
@@ -233,9 +251,19 @@ jobs:
233
251
pull_request_template_version=2
234
252
-->"
235
253
254
+
if EXISTING_PR=$(gh pr list --repo "$REPO" --head "$BRANCH" \
255
+
--json number --jq '.[0].number' 2>/dev/null) && [ -n "$EXISTING_PR" ]; then
256
+
gh api "repos/$REPO/pulls/$EXISTING_PR" \
257
+
--method PATCH \
258
+
-f title="Sync llms.txt and llms-full.txt from docs.github.com" \
259
+
-f body="$PR_BODY" > /dev/null
260
+
echo "Monolith PR #$EXISTING_PR already exists, updated with new commit"
261
+
exit 0
262
+
fi
263
+
236
264
gh pr create \
237
265
--repo "$REPO" \
238
-
--title "Sync llms.txt from docs.github.com" \
266
+
--title "Sync llms.txt and llms-full.txt from docs.github.com" \
0 commit comments