Skip to content

fix(ci): remove generated artifacts from repo, fix MCPB 404 race condition (#181)#182

Merged
polaz merged 8 commits intomainfrom
feat/#181-fixci-remove-generated-artifacts-from-repo-fix-mcp
Jan 24, 2026
Merged

fix(ci): remove generated artifacts from repo, fix MCPB 404 race condition (#181)#182
polaz merged 8 commits intomainfrom
feat/#181-fixci-remove-generated-artifacts-from-repo-fix-mcp

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 24, 2026

Summary

  • Remove docs/TOOLS.md from git — now generated at build time in CI, no longer pollutes release commits
  • Fix MCPB 404 race condition — replace release: [published] trigger with workflow_run so docs deploy waits for CI/CD Pipeline (incl. mcpb-bundle) to complete
  • Add inject-tool-refs script — auto-syncs curated docs action tables from tool schemas via <!-- @autogen:tool --> markers
  • Fix broken linkdocs/tools/index.md now links to local /TOOLS instead of GitHub file URL
  • Add sidebar entry — "Full API Reference" link in VitePress /tools/ sidebar
  • SEO metadatatitleTemplate, transformHead() for OG/Twitter, robots.txt, frontmatter on all 72 pages
  • inject-tool-refs tests — 45 unit tests, 98.91% line coverage on src/cli/inject-tool-refs.ts
  • Enable sitemap.xml — VitePress sitemap generation with hostname config

Changes

File Change
.gitignore Add docs/TOOLS.md
.releaserc.json Remove TOOLS.md from exec prepareCmd and git assets
.github/workflows/docs.yml workflow_run trigger + build/generate steps
src/cli/inject-tool-refs.ts Marker-based action table injection + export internals for testing
tests/unit/cli/inject-tool-refs.test.ts 45 unit tests (98.91% line coverage)
package.json Add inject-tool-refs script
docs/.vitepress/config.mts Sidebar link + titleTemplate + transformHead + sitemap
docs/public/robots.txt New: Allow all + sitemap URL
docs/tools/index.md Fix TOOLS.md link to local /TOOLS
docs/tools/*.md Add 15 @autogen:tool markers (4 files)
docs/**/*.md (72 files) Add title + description YAML frontmatter

Auto-synced actions (previously missing from curated docs)

Tool Added actions
browse_files download_attachment
manage_work_item add_link, remove_link

SEO improvements

  • Per-page <title> via titleTemplate: "%s | GitLab MCP"
  • transformHead() generates og:title, og:description, og:url, twitter:card, twitter:title, twitter:description
  • All 72 docs pages have title + description frontmatter (max 160 chars)
  • robots.txt allows all crawlers + references sitemap.xml
  • sitemap.xml auto-generated by VitePress with hostname

Test plan

  • yarn lint — 0 errors
  • yarn test — 3878 tests pass (including 45 new inject-tool-refs tests)
  • yarn build — compiles successfully
  • yarn docs:build — generates docs with sitemap, validates all frontmatter
  • yarn inject-tool-refs — updates 4 files, 15 markers
  • Second run of inject-tool-refs — 0 updates (idempotent)
  • inject-tool-refs coverage: 98.91% lines, 97.43% branches, 100% functions
  • After merge: verify workflow_run triggers docs deploy after CI/CD completes
  • After merge: verify /downloads/gitlab-mcp-latest.mcpb returns 200

Closes #181

…ition

- Remove docs/TOOLS.md from git tracking (generated at build time)
- Remove TOOLS.md generation from semantic-release exec/git plugins
- Replace release:published trigger with workflow_run in docs.yml
- Add build + generate steps before docs:build (TOOLS.md + inject-tool-refs)
- Add inject-tool-refs.ts script for auto-syncing curated docs action tables
- Add @Autogen:tool markers to curated docs (ci-cd, code-review, project-management, repository)
- Fix TOOLS.md link in docs/tools/index.md (local /TOOLS instead of GitHub URL)
- Add "Full API Reference" link to VitePress sidebar

Closes #181
Copilot AI review requested due to automatic review settings January 24, 2026 15:05
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 24, 2026

Test Coverage Report

Overall Coverage: 93.57%

Metric Percentage
Statements 93.07%
Branches 84.85%
Functions 82.94%
Lines 93.57%

View detailed coverage report

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 24, 2026

Codecov Report

❌ Patch coverage is 96.80851% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cli/inject-tool-refs.ts 96.80% 1 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses CI/CD infrastructure issues related to generated documentation artifacts and race conditions in the documentation deployment workflow.

Changes:

  • Removes the auto-generated docs/TOOLS.md from git tracking, treating it as a build artifact generated only in CI
  • Fixes MCPB 404 race condition by replacing release: [published] trigger with workflow_run to ensure docs deploy waits for CI/CD Pipeline completion
  • Adds inject-tool-refs script to auto-sync curated documentation action tables from tool schemas via @autogen:tool markers

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/cli/inject-tool-refs.ts New script to inject action tables from schemas into markdown files with autogen markers
package.json Adds inject-tool-refs script command pointing to compiled output
docs/TOOLS.md Removed from git tracking (2901-line deletion)
.gitignore Adds docs/TOOLS.md to ignore list
.releaserc.json Removes TOOLS.md from git assets and prepareCmd generation
.github/workflows/docs.yml Changes trigger to workflow_run, adds build and generation steps
docs/tools/*.md Adds @Autogen:tool markers to 4 curated documentation files (15 markers total)
docs/tools/index.md Fixes link from GitHub URL to local /TOOLS path
docs/.vitepress/config.mts Adds "Full API Reference" sidebar entry

polaz added 3 commits January 24, 2026 17:24
- titleTemplate and transformHead() in VitePress config for per-page OG/Twitter meta
- robots.txt with sitemap reference
- title/description frontmatter on all 72 documentation pages
- Export extractActions, generateActionsTable, findMarkers, processFile
- 45 tests covering oneOf/enum schemas, markers, file processing, main()
- Remove depth limit on project root discovery (traverse to FS root)
- Simplify NODE_ENV guard (remove redundant undefined check)
- Accept optional content param in processFile to avoid double reads
- Escape pipe chars in action descriptions for valid markdown tables
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 80 changed files in this pull request and generated 2 comments.

…r OG urls

- Escape backslash before pipe in generateActionsTable (CodeQL alert)
- Use new URL() for robust og:url construction in transformHead
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 80 changed files in this pull request and generated 1 comment.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 80 changed files in this pull request and generated no new comments.

@polaz polaz enabled auto-merge (squash) January 24, 2026 16:10
@polaz polaz merged commit 6f17c99 into main Jan 24, 2026
15 checks passed
@polaz polaz deleted the feat/#181-fixci-remove-generated-artifacts-from-repo-fix-mcp branch January 24, 2026 16:12
sw-release-bot bot pushed a commit that referenced this pull request Jan 24, 2026
## [6.41.2](v6.41.1...v6.41.2) (2026-01-24)

### Bug Fixes

* **ci:** remove generated artifacts from repo, fix MCPB 404 race condition ([#181](#181)) ([#182](#182)) ([6f17c99](6f17c99))
* **mcpb:** reduce bundle size from 84MB to ~45MB ([#184](#184)) ([37f9c29](37f9c29)), closes [#183](#183)
@sw-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 6.41.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): remove generated artifacts from repo, fix MCPB 404 race condition on Pages

3 participants