Skip to content

[BUGS-10991] Extract waitForCommit into reusable utility class#2789

Open
greg-1-anderson wants to merge 1 commit into
4.xfrom
refactor/extract-wait-for-commit-utility
Open

[BUGS-10991] Extract waitForCommit into reusable utility class#2789
greg-1-anderson wants to merge 1 commit into
4.xfrom
refactor/extract-wait-for-commit-utility

Conversation

@greg-1-anderson
Copy link
Copy Markdown
Member

@greg-1-anderson greg-1-anderson commented Mar 4, 2026

Claude's implementation of my idea, which is essentially the same as @stevector 's idea. The basic idea here is to make a new Terminus release with a utility class that the Build Tools plugin can use, and then make a new version of the Build Tools plugin that requires this new Terminus release.

Summary

  • Extracted the waitForCommit logic from WaitCommand into a standalone static method in Pantheon\Terminus\Helpers\Utility\WaitForCommit.
  • The utility accepts Request and LoggerInterface as explicit parameters, making it callable from outside the command context.
  • WaitCommand::waitForCommit() now delegates to the utility class, preserving existing behavior.

Test plan

  • Verify workflow:wait --commit <sha> command still works as before.
  • Verify the static method can be called independently with a Request and LoggerInterface instance.

Move the commit-waiting logic from WaitCommand into a static method
in Helpers\Utility\WaitForCommit so it can be called from outside
the command context. The WaitCommand now delegates to the utility,
passing in the Request and Logger dependencies explicitly.
@greg-1-anderson greg-1-anderson requested a review from a team as a code owner March 4, 2026 03:35
@greg-1-anderson greg-1-anderson marked this pull request as draft March 4, 2026 03:35
@greg-1-anderson greg-1-anderson changed the title Extract waitForCommit into reusable utility class [BUGS-10991] Extract waitForCommit into reusable utility class Mar 4, 2026
@jazzsequence jazzsequence marked this pull request as ready for review March 18, 2026 17:28
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.

3 participants