Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: strategy is now an interface and not an abstract class #1144

Merged
merged 3 commits into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {Strategy, StrategyOptions} from './strategy';
import {Strategy} from './strategy';
import {Go} from './strategies/go';
import {GoYoshi} from './strategies/go-yoshi';
import {JavaYoshi} from './strategies/java-yoshi';
Expand Down Expand Up @@ -43,6 +43,7 @@ import {CargoWorkspace} from './plugins/cargo-workspace';
import {ChangelogNotes, ChangelogSection} from './changelog-notes';
import {GitHubChangelogNotes} from './changelog-notes/github';
import {DefaultChangelogNotes} from './changelog-notes/default';
import {BaseStrategyOptions} from './strategies/base';

// Factory shared by GitHub Action and CLI for creating Release PRs
// and GitHub Releases:
Expand Down Expand Up @@ -71,7 +72,7 @@ const allReleaseTypes = [
'terraform-module',
] as const;
export type ReleaseType = typeof allReleaseTypes[number];
type ReleaseBuilder = (options: StrategyOptions) => Strategy;
type ReleaseBuilder = (options: BaseStrategyOptions) => Strategy;
type Releasers = Record<string, ReleaseBuilder>;
const releasers: Releasers = {
go: options => new Go(options),
Expand Down
Loading