Per copilot review of #1286
Tool.update_bitbucket_steps() returns early when pre-commit is used, which prevents cleanup of any previously-added Bitbucket steps for this tool. This can leave stale per-tool CI steps in bitbucket-pipelines.yml after a project switches to running QA via pre-commit (or after use_ci_bitbucket() is re-run), causing duplicated CI work. Consider removing this tool’s managed Bitbucket steps when is_pre_commit_used() is true (or otherwise ensuring stale steps are cleaned up) before returning.
Tests should be written for this case, and the bug fixed.
Per copilot review of #1286
Tool.update_bitbucket_steps()returns early when pre-commit is used, which prevents cleanup of any previously-added Bitbucket steps for this tool. This can leave stale per-tool CI steps inbitbucket-pipelines.ymlafter a project switches to running QA via pre-commit (or afteruse_ci_bitbucket()is re-run), causing duplicated CI work. Consider removing this tool’s managed Bitbucket steps whenis_pre_commit_used()is true (or otherwise ensuring stale steps are cleaned up) before returning.Tests should be written for this case, and the bug fixed.