19 Commits

Author SHA1 Message Date
Gu
4f36faa03b Remove test mode from approval retrigger workflow
- Remove workflow_dispatch trigger (was for testing)
- Remove manual trigger handling code
- Uncomment fork/author/reviewer checks
- Workflow now only triggers on actual PR approvals

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 14:46:22 -08:00
Chenhe Gu
224923311b Add workflow to retrigger translation on PR approval (#625)
Closes the gap where first-time contributor PRs require maintainer
approval, but approval events don't trigger the translation workflow.

New workflow: sync_docs_on_approval.yml
- Listens to pull_request_review (submitted, approved)
- Re-runs the most recent Analyze workflow for the PR
- This triggers the existing Execute chain with fresh artifacts
- Posts "approval received" comment before starting

Note: Fork/author/reviewer checks are commented out for testing.
Search for "TODO: UNCOMMENT" to restore after testing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 16:25:37 -08:00
Chenhe Gu
f9c1a5f424 revert last 5 commits that may have caused landing page load error (#576)
* Revert last 5 commits

* revert last 5 commits
2025-12-02 13:42:20 +08:00
yyh
c55d6e824a feat: add CI quality gate workflows for documentation (#571)
* feat: add CI quality gate workflows for documentation

Add three new GitHub Actions workflows to enforce documentation quality:

- build-test.yml: Validates Mintlify build succeeds on PRs
- quality-check.yml: Checks frontmatter, links, images, code blocks
- validate-docs-json.yml: Validates docs.json structure and file references

These workflows complement the existing translation automation by
providing quality gates that block PRs with documentation issues.

Fix: Remove continue-on-error to ensure workflows properly fail PRs.

* chore: remove build-test.yml (redundant with Mintlify App)
2025-12-02 12:16:26 +08:00
Chenhe Gu
767397a9de changed language codes: cn -> zh, jp -> ja. with other supporting structural changes (#565)
* fix redirect language code prefixes

* rename: cn -> zh, jp -> ja

* remove hardcoded ja / zh references

* remove hardcoded 'english' references

* renamed variable names and dict keys to language agnostic names

* fix: add missing language helper methods to PRAnalyzer

- Add get_language_directory() method
- Initialize source_language and target_languages from config
- Fixes AttributeError when generating mixed PR errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test: kitchen sink workflow validation v2

This PR validates the translation workflow after config-driven refactoring:

Changes:
- Add new test file: test-workflow-validation.mdx
- Modify existing file: introduction.mdx
- Update docs.json navigation

Tests:
- New file translation (add workflow)
- Existing file translation (update workflow)
- Navigation sync across languages
- Config-driven language codes (zh/ja instead of cn/jp)
- Source language abstraction (no hardcoded "English")

Expected workflow behavior:
1. Detect changes in en/ directory
2. Translate new file to zh and ja
3. Update modified file translations
4. Sync docs.json for all language sections
5. Commit translated files automatically

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update workflow paths to use zh/ja instead of cn/jp

Aligns workflow trigger paths with the zh/ja language directory rename.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Revert "fix: update workflow paths to use zh/ja instead of cn/jp"

This reverts commit 9587b7cc5d.

* Revert "test: kitchen sink workflow validation v2"

This reverts commit 4abdd69fd2.

* fix: update workflow paths in doc analyze workflow to use zh/ja instead of cn/jp

* Refactor/language codes (#240)

* test: kitchen sink workflow validation v2

This PR validates the translation workflow after config-driven refactoring:

Changes:
- Add new test file: test-workflow-validation.mdx
- Modify existing file: introduction.mdx
- Update docs.json navigation

Tests:
- New file translation (add workflow)
- Existing file translation (update workflow)
- Navigation sync across languages
- Config-driven language codes (zh/ja instead of cn/jp)
- Source language abstraction (no hardcoded "English")

Expected workflow behavior:
1. Detect changes in en/ directory
2. Translate new file to zh and ja
3. Update modified file translations
4. Sync docs.json for all language sections
5. Commit translated files automatically

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update workflow paths to use zh/ja instead of cn/jp

Aligns workflow trigger paths with the zh/ja language directory rename.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Revert "fix: update workflow paths to use zh/ja instead of cn/jp"

This reverts commit 9587b7cc5d.

* Revert "test: kitchen sink workflow validation v2"

This reverts commit 4abdd69fd2.

* fix: update workflow paths in doc analyze workflow to use zh/ja instead of cn/jp

---------

Co-authored-by: Claude <noreply@anthropic.com>

* fix: update workflow files to use 'source' instead of 'english'

After refactoring the PR analyzer to use 'source' for source language
PRs (instead of hardcoded 'english'), the workflow files need to match.

Changes:
- sync_docs_analyze.yml: pr_type == 'source' (was 'english')
- sync_docs_update.yml: PR_TYPE != 'source' check
- Updated all comments from "English" to "source language"
- Updated all pr_type values in JSON from "english" to "source"

This ensures the workflows trigger correctly with the refactored
config-driven language system.

Related: language code refactoring (cn/jp → zh/ja)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix/workflow source language references (#245)

* test: kitchen sink workflow validation v2

This PR validates the translation workflow after config-driven refactoring:

Changes:
- Add new test file: test-workflow-validation.mdx
- Modify existing file: introduction.mdx
- Update docs.json navigation

Tests:
- New file translation (add workflow)
- Existing file translation (update workflow)
- Navigation sync across languages
- Config-driven language codes (zh/ja instead of cn/jp)
- Source language abstraction (no hardcoded "English")

Expected workflow behavior:
1. Detect changes in en/ directory
2. Translate new file to zh and ja
3. Update modified file translations
4. Sync docs.json for all language sections
5. Commit translated files automatically

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update workflow paths to use zh/ja instead of cn/jp

Aligns workflow trigger paths with the zh/ja language directory rename.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Revert "fix: update workflow paths to use zh/ja instead of cn/jp"

This reverts commit 9587b7cc5d.

* Revert "test: kitchen sink workflow validation v2"

This reverts commit 4abdd69fd2.

* fix: update workflow paths in doc analyze workflow to use zh/ja instead of cn/jp

* fix: update workflow files to use 'source' instead of 'english'

After refactoring the PR analyzer to use 'source' for source language
PRs (instead of hardcoded 'english'), the workflow files need to match.

Changes:
- sync_docs_analyze.yml: pr_type == 'source' (was 'english')
- sync_docs_update.yml: PR_TYPE != 'source' check
- Updated all comments from "English" to "source language"
- Updated all pr_type values in JSON from "english" to "source"

This ensures the workflows trigger correctly with the refactored
config-driven language system.

Related: language code refactoring (cn/jp → zh/ja)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>

* fix

* fix docs.json language codes

* rename previous version docs: cn -> zh, jp -> ja

* rm duplicate redirect entires

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 04:00:02 -08:00
Chenhe Gu
f5d84b7790 Fix/sync pr auto close (#560)
* fix redirect language code prefixes

* fix: don't close sync PR when original is merged

Only close sync PR when original is closed without merging.
When original is merged, leave sync PR open for independent review.
2025-11-27 07:25:53 -08:00
Chenhe Gu
7c11027d80 Fix/allow stale branch auto sync (#556)
* fix redirect language code prefixes

* fix: Allow stale branches to trigger auto-sync without false mixed-content errors

Changes the PR analysis to use merge-base instead of PR base commit for
comparison. This allows stale branches to trigger translation automation
without being falsely flagged as "mixed content" PRs.

**Problem:**
- When a PR branch becomes stale (main moves forward after branch creation)
- Old approach compared PR_BASE (main's current HEAD) vs PR_HEAD
- This included unrelated changes from main as "part of the PR"
- Caused false "mixed content" errors (e.g., PR #555)

**Solution:**
- Use merge-base to find where branch diverged from main
- Compare MERGE_BASE vs PR_HEAD (only actual PR changes)
- Ignore unrelated changes that landed on main after branch creation

**Benefits:**
-  Better contributor experience (no manual branch updates needed)
-  Accurate PR categorization (no false positives)
-  Faster automation (no waiting for updates)
-  Works with concurrent PRs

**Example (PR #555):**
- OLD: Detected 4 files (en + cn + jp) → "mixed content" 
- NEW: Detected 1 file (en only) → "english" 

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-27 04:36:24 -08:00
Chenhe Gu
08e9e11c90 Replace main with revamp (#547) 2025-11-26 04:46:31 -08:00
Alter-xyz
98b84e3b7f !feat: action on pull request
main branch is now protected
2025-05-19 21:54:16 +08:00
Alter-xyz
2a089a31ff Update docs_bundle.yml 2025-05-19 17:31:11 +08:00
Alter-xyz
c75078ddd5 chore: action 2025-05-19 17:28:43 +08:00
Alter-xyz
8fb0738a8f chore: format matching 2025-05-19 10:37:03 +08:00
Alter-xyz
2ca78ac8e9 fix: git message 2025-05-18 00:20:13 +08:00
Alter-xyz
f8da9ed2f8 fix: git message 2025-05-18 00:11:57 +08:00
Alter-xyz
fb3ade9d72 feat: just one 2025-05-17 23:51:16 +08:00
Alter-xyz
f9092f6d7b fix and test 2025-05-17 23:24:32 +08:00
Alter-xyz
af71d8af24 feat: action 2025-05-17 23:14:41 +08:00
Alter-xyz
d070538908 Update process-mdx.yml 2025-05-17 20:03:50 +08:00
Alter-xyz
8cbe9b311d Create process-mdx.yml 2025-05-17 19:43:33 +08:00