Skip to content

Conversation

@katzper-michno
Copy link
Contributor

@katzper-michno katzper-michno commented Dec 18, 2024

Resolves #122

Changes

  • Changes cli interface: remove --preset flag and instead add -pull-request and -main. Example usage could be setup-ci -pull-request jest ts -main lint ts.
  • Extends CycliConfig to Map<WorkflowEvent, Set<CycliWorkflowType>>, which is obtained by ConfigExtension using two multiselect prompts (one for pull request, one for push to main), or provided cli flags.
  • Add ExecutorExtension that based on CycliConfig, performs all required actions, which are split into two steps: project configuration and workflow generation
  • WorkflowsExtension receives object events: WorkflowEvent[] based on which appropriate on: field in generated workflows is created.

All changes are designed in such a way to make the logic extendable in the direction of adding more supported events.

TODO:

  • Update documentation
  • Update links to docs
  • Adjust help message (use [<workflow1> <workflow2>...] to signalize that -pull-request and -main flags should be proceeded by a list of workflows
  • Add unit tests for new cases (new syntax works, but push, or multiple branches do not work)
  • Manual testing of less trivial cases in large projects
  • More push branches are not handled by recipes
  • Adjust analytics (it should work, but potentially not important as union of all features is sent)

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.

Add possibility to setup multibranch

2 participants