Separate auto-deployment from watching for changes#124
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
cff2e0d to
dbf3e96
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Only deploy if auto-deploy is enabled AND (there are git changes OR project is in error state) | ||
| hasGitChanges := currentCommit != remoteCommit | ||
| isInErrorState := project.Status != domain.ProjectStatusRunning && project.Status != domain.ProjectStatusStopped | ||
| shouldDeploy := hasGitChanges || isInErrorState | ||
| shouldDeploy := project.AutoDeployEnabled && (hasGitChanges || isInErrorState) |
There was a problem hiding this comment.
Auto-deploying projects that were manually stopped
With the watcher now calling checkProject for every project, shouldDeploy only guards on AutoDeployEnabled and pending commits (hasGitChanges || isInErrorState). A project that a user has stopped but left auto‑deployment enabled (the default) will be redeployed as soon as a new commit appears because stopped projects still satisfy hasGitChanges. Prior to this change stopped projects were skipped entirely. This regresses the ability to keep a project paused while watching for updates. Consider adding a check that project.Status is not ProjectStatusStopped before triggering an automatic deployment.
Useful? React with 👍 / 👎.
dbf3e96 to
b9900c3
Compare
No description provided.