Skip to content

feat(workbenches): implement PR follow-up feature - #789

Open
floreks wants to merge 2 commits into
mainfrom
sebastian/prod-5078-plural-workbencheswb-pr-followup-command
Open

feat(workbenches): implement PR follow-up feature#789
floreks wants to merge 2 commits into
mainfrom
sebastian/prod-5078-plural-workbencheswb-pr-followup-command

Conversation

@floreks

@floreks floreks commented Jul 28, 2026

Copy link
Copy Markdown
Member
  • Add CreateWorkbenchPRFollowup method in console client mocks.
  • Implement pr-followup command to send follow-up prompts for workbench jobs.
  • Include workbenches command in CLI to manage Plural workbenches.
  • Rename ListaStacks to ListStacks in multiple files for consistency.
  • Update dependencies in go.mod.

Add tests for workbench features, including PR follow-up client and resolver logic.

Summary

Labels

Test Plan

Checklist

  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • I have added relevant labels to this PR to help with categorization for release notes.

- Add `CreateWorkbenchPRFollowup` method in console client mocks.
- Implement `pr-followup` command to send follow-up prompts for workbench jobs.
- Include `workbenches` command in CLI to manage Plural workbenches.
- Rename `ListaStacks` to `ListStacks` in multiple files for consistency.
- Update dependencies in `go.mod`.

Add tests for workbench features, including PR follow-up client and resolver logic.
@floreks floreks self-assigned this Jul 28, 2026
@floreks floreks added the enhancement New feature or request label Jul 28, 2026
@linear

linear Bot commented Jul 28, 2026

Copy link
Copy Markdown

PROD-5078

@socket-security

socket-security Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub.com/​pluralsh/​console/​go/​client@​v1.76.5 ⏵ v1.78.0100 +110010010070

View full report

Comment thread pkg/console/console.go
GetUser(email string) (*consoleclient.UserFragment, error)
ListaStacks() (*consoleclient.ListInfrastructureStacks, error)
ListStacks() (*consoleclient.ListInfrastructureStacks, error)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Exported interface rename breaks consumers

When downstream packages call ConsoleClient.ListaStacks or provide their own implementation of the exported interface, replacing the method with ListStacks breaks source compatibility and causes those consumers to fail compilation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

there should never be any downstream clients for this wrapper. It's not intended to be used outside of the plural-cli

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got it — if this interface is strictly internal to plural-cli with no external consumers intended, the rename is perfectly safe. Thanks for the clarification.

Should I remember this as a rule: "The ConsoleClient interface in pkg/console/console.go is internal to plural-cli and not intended for use by downstream packages, so interface changes don't need to account for external source compatibility"?

Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a workbench PR follow-up CLI flow.

  • Registers the new workbenches command and its pr-followup subcommand.
  • Resolves pull-request URLs from explicit URLs or Git commit metadata across GitHub, GitLab, and Bitbucket.
  • Adds the Console mutation wrapper, mocks, and unit tests.
  • Upgrades the Console Go client and renames ListaStacks to ListStacks.

Confidence Score: 4/5

The exported ConsoleClient method rename must preserve compatibility or be explicitly handled as a breaking API change before merging.

Replacing ListaStacks with ListStacks directly breaks compilation for downstream callers and custom implementations of the exported ConsoleClient interface, while the new workbench follow-up flow otherwise has focused validation and test coverage.

Files Needing Attention: pkg/console/console.go and pkg/console/stacks.go

Important Files Changed

Filename Overview
cmd/command/workbenches/pull_request_resolver.go Implements provider inference, repository URL parsing, commit-subject parsing, and explicit URL validation.
cmd/command/workbenches/pr_followup_service.go Validates follow-up requests, resolves PR URLs, calls Console, and supports skipping missing workbench jobs.
cmd/command/workbenches/workbenches.go Defines and wires the workbenches pr-followup CLI command.
pkg/console/workbenches.go Wraps the generated WorkbenchPrFollowup mutation and validates its response.
pkg/console/console.go Extends ConsoleClient for workbench follow-ups but removes the existing ListaStacks method, breaking exported API compatibility.
go.mod Upgrades the generated Console client; the reported vulnerable indirect dependencies are unchanged and have no reachable affected paths in this CLI.

Reviews (1): Last reviewed commit: "feat(workbenches): implement PR follow-u..." | Re-trigger Greptile

…tallation

- Fix typo in `ListStacks` API error response parameter in `stacks.go`
- Update Plural CLI installation command with specific commit hash in GitHub Actions workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant