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

Fix: allow choosing live versions #72

Conversation

tsemachLi
Copy link
Contributor

No description provided.

@@ -46,10 +46,9 @@ export default class AppDeploy extends AuthenticatedCommand {
async getAppVersionId(appVersionId: string | undefined, appId: string | undefined, force: boolean): Promise<string> {
if (appVersionId) return appVersionId;

const latestDraftVersion = await DynamicChoicesService.chooseAppAndAppVersion({
const latestDraftVersion = await DynamicChoicesService.chooseAppAndAppVersion(false, Boolean(force), {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const latestDraftVersion = await DynamicChoicesService.chooseAppAndAppVersion(false, Boolean(force), {
const latestDraftVersion = await DynamicChoicesService.chooseAppAndAppVersion(false, !!force, {

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ESLint: use Boolean(force) instead.(no-implicit-coercion)

Comment on lines +48 to +51
async chooseAppAndAppVersion(
useDeprecatedVersion: boolean,
useLiveVersion: boolean,
options?: { appId?: number; autoSelectVersion?: boolean },
Copy link
Collaborator

Choose a reason for hiding this comment

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

General comment:
Transfering true, true can cause issues as well.
What do you say about having an object for the arguments? not optional, but an object for better readability

Suggested change
async chooseAppAndAppVersion(
useDeprecatedVersion: boolean,
useLiveVersion: boolean,
options?: { appId?: number; autoSelectVersion?: boolean },
async chooseAppAndAppVersion(
{ useDeprecatedVersion: boolean,
useLiveVersion: boolean },
options?: { appId?: number; autoSelectVersion?: boolean },

This will make sure people understand what is true and what is false

@tsemachLi tsemachLi merged commit c796e4a into master Jan 10, 2024
1 check passed
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.

2 participants