← 输入框|github.com|刷新
Skip to content

api | web | docs: accept watch paths when creating a service - #25

Merged
yekta merged 1 commit into
masterfrom
feat/create-service-watch-paths
Oct 17, 2026
Merged

yekta merged 1 commit into
masterfrom
feat/create-service-watch-paths

Conversation

@yekta

@yekta yekta commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

create-service had no watch_paths field. The API returned a 422 and the MCP tool didn't offer it, while update-service already accepted it. So a monorepo service had to be created and then updated before its first push. Otherwise it deployed on every push to the repo in between.

  • API: CreateServiceInput takes watch_paths. The patterns are cleaned the same way as on update: trimmed, deduped and length-checked. Only GitHub services accept them; any other service type that sends them gets an invalid-input error. The OpenAPI spec and the generated web client are regenerated.
  • Web: the undeployed git panel has a Watch Paths field under Advanced Settings, so the patterns are saved before the first deploy. The pattern picker uses the branch selected in the form.
  • Docs: the GitHub deploy page explains how to set watch paths before the first deploy and how to send watch_paths over the API or MCP.

Fixes UNB-411.

Testing

Adds TestCleanCreateWatchPaths, which covers:

  • unset patterns
  • trimming and deduping of GitHub patterns
  • refusing image and database services
  • refusing patterns that are too long

create-service had no watch_paths field, so a monorepo service had to be created and then updated before its first push, or it would deploy on every push in between.

- The create input now takes watch_paths, cleaned the same way as on update. Non-GitHub services that send it are refused.
- The undeployed git panel shows a Watch Paths field under Advanced Settings, so the patterns are saved before the first deploy.
- The docs cover setting watch paths before the first deploy and over the API or MCP.

Fixes UNB-411.
@yekta
yekta merged commit 19974ba into master Oct 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant