diff --git a/.github/workflows/changelog-agent.lock.yml b/.github/workflows/changelog-agent.lock.yml
index f5e3785a84e7..ae6e36173163 100644
--- a/.github/workflows/changelog-agent.lock.yml
+++ b/.github/workflows/changelog-agent.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"bf570d28675692d1a0aefd54ddfb176192bd6ce29b2802af8c6bb4f231b6f3a5","compiler_version":"v0.71.5","strict":true,"agent_id":"copilot"}
+# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"2a7b866ba2f659b55db5b549147afeea1fa72dcbdfbba2931f1519ad8868207b","compiler_version":"v0.71.5","strict":true,"agent_id":"copilot"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","DOCS_ALERTS_SLACK_CHANNEL_ID","DOCS_BOT_PAT_BASE","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN","SLACK_DOCS_BOT_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9"},{"repo":"actions/github-script","sha":"ed597411d8f924073f98dfc5c65a23a2325f34cd","version":"v8"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"b8068426813005612b960b5ab0b8bd2c27142323","version":"v0.71.5"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.40","digest":"sha256:14ff567e8d9d4c2fbc5e55c973488381c71d7e0fdbe72d30ee7b8a738fd86504","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.40@sha256:14ff567e8d9d4c2fbc5e55c973488381c71d7e0fdbe72d30ee7b8a738fd86504"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.40","digest":"sha256:2883ca3e5ae9f330cafdd9345bfd4ae17fc8da36c96d4c9a1f76e922b4c45280","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.40@sha256:2883ca3e5ae9f330cafdd9345bfd4ae17fc8da36c96d4c9a1f76e922b4c45280"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.40","digest":"sha256:b084f4a2c771f584ee68084ced52fa6b3245197a1889645d817462d307d3ac51","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.40@sha256:b084f4a2c771f584ee68084ced52fa6b3245197a1889645d817462d307d3ac51"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]}
# ___ _ _
# / _ \ | | (_)
@@ -64,8 +64,7 @@ name: 'Changelog Entry Drafter'
# uses: actions/github-script@v8
# with:
# script: |
- # // Default octokit uses github.token for in-repo (docs-internal) calls
- # const octokit = github;
+ # // octokit (provided by github-script) uses github.token for in-repo (docs-internal) calls
# // Cross-repo octokit uses DOCS_BOT_PAT for docs-content and GraphQL calls
# const crossRepoOctokit = github.getOctokit(process.env.DOCS_BOT_PAT);
#
@@ -437,23 +436,23 @@ jobs:
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
- cat << 'GH_AW_PROMPT_8972824f8e369065_EOF'
+ cat << 'GH_AW_PROMPT_9151b065f308a936_EOF'
- GH_AW_PROMPT_8972824f8e369065_EOF
+ GH_AW_PROMPT_9151b065f308a936_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
- cat << 'GH_AW_PROMPT_8972824f8e369065_EOF'
+ cat << 'GH_AW_PROMPT_9151b065f308a936_EOF'
Tools: add_comment(max:2), create_pull_request, missing_tool, missing_data, noop, failure_alert, slack_notify
- GH_AW_PROMPT_8972824f8e369065_EOF
+ GH_AW_PROMPT_9151b065f308a936_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_create_pull_request.md"
- cat << 'GH_AW_PROMPT_8972824f8e369065_EOF'
+ cat << 'GH_AW_PROMPT_9151b065f308a936_EOF'
- GH_AW_PROMPT_8972824f8e369065_EOF
+ GH_AW_PROMPT_9151b065f308a936_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md"
- cat << 'GH_AW_PROMPT_8972824f8e369065_EOF'
+ cat << 'GH_AW_PROMPT_9151b065f308a936_EOF'
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
@@ -482,12 +481,12 @@ jobs:
{{/if}}
- GH_AW_PROMPT_8972824f8e369065_EOF
+ GH_AW_PROMPT_9151b065f308a936_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
- cat << 'GH_AW_PROMPT_8972824f8e369065_EOF'
+ cat << 'GH_AW_PROMPT_9151b065f308a936_EOF'
{{#runtime-import .github/workflows/changelog-agent.md}}
- GH_AW_PROMPT_8972824f8e369065_EOF
+ GH_AW_PROMPT_9151b065f308a936_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
@@ -678,9 +677,9 @@ jobs:
mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
mkdir -p /tmp/gh-aw/safeoutputs
mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
- cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_5e6c9023bc91173c_EOF'
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_4e11ebbc6efa86e7_EOF'
{"add_comment":{"max":2,"target-repo":"github/docs-internal"},"create_pull_request":{"draft":true,"labels":["ready-for-doc-review","skip FR board","llm-generated"],"max":1,"max_patch_files":100,"max_patch_size":1024,"preserve_branch_name":true,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","target-repo":"github/docs-content","title_prefix":"Changelog draft for docs-internal PR #"},"create_report_incomplete_issue":{},"failure-alert":{"description":"Send Slack alert on workflow failure","inputs":{"error_message":{"default":null,"description":"Error details","required":false,"type":"string"}},"output":"Failure alert sent"},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{},"slack-notify":{"description":"Send a Slack DM to the PR author with the changelog PR link","inputs":{"changelog_pr_url":{"default":null,"description":"URL of the created changelog PR","required":true,"type":"string"},"github_username":{"default":null,"description":"GitHub username of the PR author","required":true,"type":"string"},"parent_title":{"default":null,"description":"Title of the parent initiative issue","required":true,"type":"string"},"reviewers":{"default":null,"description":"Comma-separated list of reviewer usernames","required":false,"type":"string"},"source_pr_url":{"default":null,"description":"URL of the source docs-internal PR","required":true,"type":"string"},"stakeholders":{"default":null,"description":"Comma-separated list of stakeholder usernames","required":false,"type":"string"}},"output":"Slack notification sent"}}
- GH_AW_SAFE_OUTPUTS_CONFIG_5e6c9023bc91173c_EOF
+ GH_AW_SAFE_OUTPUTS_CONFIG_4e11ebbc6efa86e7_EOF
- name: Generate Safe Outputs Tools
env:
GH_AW_TOOLS_META_JSON: |
@@ -966,7 +965,7 @@ jobs:
mkdir -p /home/runner/.copilot
GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node)
- cat << GH_AW_MCP_CONFIG_1a928478abac6575_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
+ cat << GH_AW_MCP_CONFIG_b50a03f95f27b970_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
{
"mcpServers": {
"github": {
@@ -1007,7 +1006,7 @@ jobs:
"payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}"
}
}
- GH_AW_MCP_CONFIG_1a928478abac6575_EOF
+ GH_AW_MCP_CONFIG_b50a03f95f27b970_EOF
- name: Mount MCP servers as CLIs
id: mount-mcp-clis
continue-on-error: true
@@ -1668,8 +1667,7 @@ jobs:
DOCS_BOT_PAT: ${{ secrets.DOCS_BOT_PAT_BASE }}
with:
script: |
- // Default octokit uses github.token for in-repo (docs-internal) calls
- const octokit = github;
+ // octokit (provided by github-script) uses github.token for in-repo (docs-internal) calls
// Cross-repo octokit uses DOCS_BOT_PAT for docs-content and GraphQL calls
const crossRepoOctokit = github.getOctokit(process.env.DOCS_BOT_PAT);
diff --git a/.github/workflows/changelog-agent.md b/.github/workflows/changelog-agent.md
index 2034c9cef43a..69a81e0dfb54 100644
--- a/.github/workflows/changelog-agent.md
+++ b/.github/workflows/changelog-agent.md
@@ -32,8 +32,7 @@ on:
DOCS_BOT_PAT: ${{ secrets.DOCS_BOT_PAT_BASE }}
with:
script: |
- // Default octokit uses github.token for in-repo (docs-internal) calls
- const octokit = github;
+ // octokit (provided by github-script) uses github.token for in-repo (docs-internal) calls
// Cross-repo octokit uses DOCS_BOT_PAT for docs-content and GraphQL calls
const crossRepoOctokit = github.getOctokit(process.env.DOCS_BOT_PAT);
diff --git a/src/workflows/secondary-ratelimit-retry.ts b/src/workflows/secondary-ratelimit-retry.ts
index ad0fe2e0e88b..c70cb8ab9370 100644
--- a/src/workflows/secondary-ratelimit-retry.ts
+++ b/src/workflows/secondary-ratelimit-retry.ts
@@ -1,5 +1,3 @@
-import { RequestError } from '@octokit/request-error'
-
const DEFAULT_SLEEPTIME = parseInt(process.env.SECONDARY_RATELIMIT_RETRY_SLEEPTIME || '30000', 10)
const DEFAULT_ATTEMPTS = parseInt(process.env.SECONDARY_RATELIMIT_RETRY_ATTEMPTS || '5', 10)
@@ -16,9 +14,14 @@ export async function octoSecondaryRatelimitRetry(
try {
return await fn()
} catch (error) {
+ // Use duck-typing instead of `instanceof RequestError` because octokit
+ // bundles its own copy of @octokit/request-error in dist-bundle/index.js,
+ // so the class reference differs from the top-level package and instanceof
+ // always returns false across the module boundary.
if (
- error instanceof RequestError &&
- error.status === 403 &&
+ error instanceof Error &&
+ 'status' in error &&
+ (error as { status: number }).status === 403 &&
/You have exceeded a secondary rate limit/.test(error.message)
) {
if (tries < attempts) {