Skip to content

Separate auto-deployment from watching for changes#124

Merged
Ch00k merged 1 commit into
mainfrom
watch-git-changes
Oct 28, 2025
Merged

Separate auto-deployment from watching for changes#124
Ch00k merged 1 commit into
mainfrom
watch-git-changes

Conversation

@Ch00k

@Ch00k Ch00k commented Oct 28, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@codecov

codecov Bot commented Oct 28, 2025

Copy link
Copy Markdown

@Ch00k Ch00k force-pushed the watch-git-changes branch 3 times, most recently from cff2e0d to dbf3e96 Compare October 28, 2025 10:17
@Ch00k

Ch00k commented Oct 28, 2025

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread watcher/watcher.go Outdated
Comment on lines +139 to +142
// 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@Ch00k Ch00k force-pushed the watch-git-changes branch from dbf3e96 to b9900c3 Compare October 28, 2025 10:25
@Ch00k Ch00k merged commit 1c58a2c into main Oct 28, 2025
4 checks passed
@Ch00k Ch00k deleted the watch-git-changes branch October 28, 2025 10:27
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