This fixes issue #5389 where PRs were getting stuck with pending status when
ATLANTIS_SILENCE_VCS_STATUS_NO_PLANS and ATLANTIS_SILENCE_VCS_STATUS_NO_PROJECTS
were enabled and no projects matched when_modified patterns.
Root cause:
- PR #5242 (commit be060636) introduced early pending status setting in command_runner.go
- When silence flags are enabled and no projects are found, the pending status was never cleared
- This left PRs stuck in pending state, blocking auto-merge functionality
Solution:
- Modified plan_command_runner.go to clear pending status even when silence flags are enabled
- Added else blocks to both autoplan and manual plan paths
- When silence is enabled but no projects found, update status to success (0/0) to clear pending
- Added comprehensive test to prevent regression
Testing:
- Updated existing test expectation for silence flag behavior
- Added new test TestPlanCommandRunner_SilenceFlagsClearsPendingStatus
- All existing tests continue to pass
* fix(deps): update module github.com/google/go-github/v57 to v58 in go.mod
* Update remaining go-github to v58
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Luke Massa <lmassa@tripadvisor.com>
* Do not unnecessarily create apply pipeline if it doesn't exist yet
* Updates
* Fix remaining
* Fix test logic
* Cleanup more tests
* Fix test
---------
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
* mod: rename updateCommitStatus func
* feat: add PlannedNoChangesPlanStatus
* Add skipApplyNoChanges option to PlanCommandRunner
* Add skipApplyNoChanges option to ApplyCommandRunner
* Add --skip-apply-no-changes flag
* Fix typo
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
* Rename --skip-apply-no-changes flag
* Refactor updateCommitStatus functions
* chore(docs): add detailed use case for the flag
* test: add plan_command_runner set apply status
* feat: set apply status to successful by default when result is 'No Changes'
---------
Co-authored-by: chroju <chroju@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
* fix(deps): update module github.com/petergtz/pegomock/v3 to v4 in go.mod
* remove pegomock generate m option, which is not support after v4
* make regen-mocks
* replace pegomock v4 primitive eq/matchers
* convert pegomock v4 Eq/Any matchers
* remove custom models.Repo matcher
* pegomock v4 cannot use result method args
ref https://github.com/petergtz/pegomock/issues/123
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* feat: when using order group, abort plan/apply if any fail
* feat: add 'abort_on_execution_order_fail' flag on repo level
* feat: use runProjectCmdsParallelGroups in version_command_runner
* chore: add plan tests
---------
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>