Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix(docs): prevent data sync branch fetch races
jkomyno45cdee6c9c48
diff --git a/.github/workflows/docs-tests.yml b/.github/workflows/docs-tests.ymlindex cd4c47ecc..ba723f3be 100644--- a/.github/workflows/docs-tests.yml+++ b/.github/workflows/docs-tests.yml@@ -5,6 +5,7 @@ on:paths:- 'docs/**'- '.github/actions/setup-node-pnpm-bun/action.yml'+ - '.github/workflows/docs-update-data.yml'- '.github/workflows/docs-tests.yml'- 'mise.toml'- 'mise.lock'diff --git a/.github/workflows/docs-update-data.yml b/.github/workflows/docs-update-data.ymlindex 7a9bde99d..e828fca77 100644--- a/.github/workflows/docs-update-data.yml+++ b/.github/workflows/docs-update-data.yml@@ -21,6 +21,14 @@ jobs:pull-requests: writeissues: writeenv:+ # Git 2.54 moved automatic cleanup from gc.auto to maintenance.auto, but+ # actions/[email protected] only disables the former. Disable maintenance+ # for every Git process in this job so its background task cannot race the+ # shallow fetch used to update docs/auto-update-data.+ # https://github.com/actions/checkout/issues/2437+ GIT_CONFIG_COUNT: '1'+ GIT_CONFIG_KEY_0: maintenance.auto+ GIT_CONFIG_VALUE_0: 'false'# Deliberately NOT secrets.COMPOSIO_API_KEY. That secret is shared with# ts.test-e2e, py.test, py.check and ts.examples-nightly, all of which run# against staging — it is a staging-scoped credential. This job is the onlydiff --git a/docs/tests/static/docs-data-sync-workflow.test.ts b/docs/tests/static/docs-data-sync-workflow.test.tsnew file mode 100644index 000000000..abf5186c1--- /dev/null+++ b/docs/tests/static/docs-data-sync-workflow.test.ts@@ -0,0 +1,16 @@+import { describe, expect, test } from 'bun:test';+import { readFile } from 'node:fs/promises';++const workflowPath = new URL('../../../.github/workflows/docs-update-data.yml', import.meta.url);++describe('docs data sync workflow', () => {+ test('disables automatic Git maintenance for the whole update job', async () => {+ const workflow = await readFile(workflowPath, 'utf8');+ const jobEnvironment = workflow.match(/^ env:\n((?:^ .*\n|^\n)+)/m)?.[1];++ expect(jobEnvironment).toBeDefined();+ expect(jobEnvironment).toContain("GIT_CONFIG_COUNT: '1'");+ expect(jobEnvironment).toContain('GIT_CONFIG_KEY_0: maintenance.auto');+ expect(jobEnvironment).toContain("GIT_CONFIG_VALUE_0: 'false'");+ });+});