feat(add-watch-paths-for-services): show watch paths field for docker compose applications

- Fix UI template to display Watch Paths for all GitHub-based applications
- Remove condition that limited Watch Paths to private repositories only
- Add comprehensive unit tests for isWatchPathsTriggered() method
- Test various pattern matching scenarios (wildcards, globs, etc.)
- Watch Paths now works for Docker Compose apps with both public and private repos
This commit is contained in:
Ossama Lafhel
2025-09-13 04:28:27 +02:00
parent 96b3e269c5
commit 5247185933
2 changed files with 174 additions and 1 deletions

View File

@@ -265,6 +265,14 @@
helper="If you use this, you need to specify paths relatively and should use the same compose file in the custom command, otherwise the automatically configured labels / etc won't work.<br><br>So in your case, use: <span class='dark:text-warning'>docker compose -f .{{ Str::start($application->base_directory . $application->docker_compose_location, '/') }} up -d</span>"
label="Custom Start Command" />
</div>
@if ($this->application->is_github_based())
<div class="pt-4">
<x-forms.textarea
helper="Gitignore-style rules to filter Git based webhook deployments."
placeholder="services/api/**" id="application.watch_paths"
label="Watch Paths" x-bind:disabled="shouldDisable()" />
</div>
@endif
</div>
@else
<div class="flex flex-col gap-2 xl:flex-row">
@@ -296,7 +304,7 @@
@endif
</div>
@if ($this->application->is_github_based() && !$this->application->is_public_repository())
@if ($this->application->is_github_based())
<div class="pb-4">
<x-forms.textarea
helper="Gitignore-style rules to filter Git based webhook deployments."