ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
187 stars 28 forks source link

Strategies should take functions, not just suppliers #50

Closed ajoberstar closed 6 years ago

ajoberstar commented 7 years ago

ScopeNormalStrategy takes a Supplier<Optional<Scope>> and StagePreReleaseStrategy takes a Supplier<Optional<String>>.

These would benefit from using the context generally available to the strategies, so add new constructors:

This would enable some things like, based on the target normal look at the corresponding GitHub milestone to tell what stage you're in.