Summary
The "Regen API Docs" GitHub Action replaces all github.com/tidev/ URLs in docs/api/ with github.com/appcelerator/ every time it runs. This reverts manual fixes (like those in commits 689b2911b8 and a2f553a85d by Hans) and affects 3,141 occurrences across 119 files.
Root Cause
The issue is in titanium-docgen (package inside tidev/docs-devkit):
File: packages/titanium-docgen/generators/json-raw_generator.js, lines 247-254
const stdout = exec('git config --get remote.origin.url', { cwd: filepath }).toString().trim();
const m = stdout.match(/^(git@|https:\/\/)github.com[:/]([\w-]+)\/([\w_\-.]+)\.git$/);
if (!m) {
console.log(`Unable to pull github org/repo from url: ${stdout}`);
const result = 'https://github.com/appcelerator/titanium_mobile/edit/master/';
// ^^^^^^^^^^^^^^^^^^^ hardcoded fallback to appcelerator
REPO_URLS.set(filepath, result);
return result;
}
Two problems:
-
The regex requires .git at the end of the remote URL, but actions/checkout@v3 sets the remote as https://github.com/tidev/titanium_mobile (no .git suffix) — so the regex never matches.
-
The fallback is hardcoded to appcelerator — so when the regex fails, every editUrl gets appcelerator/titanium_mobile instead of tidev/titanium_mobile.
How the pipeline works
1. Workflow runs "npm run clean:api" → deletes all docs/api/ files
2. Workflow runs "npm run docs:metadata" → titanium-docgen generates api.json
→ getRepoUrl() fails regex → falls back to appcelerator URLs
3. Workflow runs "npm run docs:migrate" → generates ~580 .md files from api.json
→ each .md gets: editUrl: https://github.com/appcelerator/...
4. git auto-commit "Apply automatic changes"
→ overwrites any previous manual URL fixes
Evidence
- Hans's manual fixes (2026-01-13):
689b2911b8, a2f553a85d — correctly changed URLs to tidev
- Bot reverted them (2026-03-15):
d1fdb129ad — "Apply automatic changes" by github-actions[bot]
- Still broken today: 3,141 occurrences of
github.com/appcelerator/ across 119 files in docs/api/
Suggested Fix
In tidev/docs-devkit, file packages/titanium-docgen/generators/json-raw_generator.js:
// Make .git optional in the regex:
const m = stdout.match(/^(git@|https:\/\/)github.com[:/]([\w-]+)\/([\w_\-.]+?)(?:\.git)?$/);
if (!m) {
console.log(`Unable to pull github org/repo from url: ${stdout}`);
// Update fallback to tidev:
const result = 'https://github.com/tidev/titanium_mobile/edit/master/';
REPO_URLS.set(filepath, result);
return result;
}
Also consider changing edit/master/ to edit/main/ since most repos now use main as the default branch.
Summary
The "Regen API Docs" GitHub Action replaces all
github.com/tidev/URLs indocs/api/withgithub.com/appcelerator/every time it runs. This reverts manual fixes (like those in commits689b2911b8anda2f553a85dby Hans) and affects 3,141 occurrences across 119 files.Root Cause
The issue is in
titanium-docgen(package insidetidev/docs-devkit):File:
packages/titanium-docgen/generators/json-raw_generator.js, lines 247-254Two problems:
The regex requires
.gitat the end of the remote URL, butactions/checkout@v3sets the remote ashttps://github.com/tidev/titanium_mobile(no.gitsuffix) — so the regex never matches.The fallback is hardcoded to
appcelerator— so when the regex fails, everyeditUrlgetsappcelerator/titanium_mobileinstead oftidev/titanium_mobile.How the pipeline works
Evidence
689b2911b8,a2f553a85d— correctly changed URLs totidevd1fdb129ad— "Apply automatic changes" by github-actions[bot]github.com/appcelerator/across 119 files indocs/api/Suggested Fix
In
tidev/docs-devkit, filepackages/titanium-docgen/generators/json-raw_generator.js:Also consider changing
edit/master/toedit/main/since most repos now usemainas the default branch.