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

Remove publish profile from logs #19

Merged
merged 2 commits into from
Feb 18, 2020

Conversation

SumiranAgg
Copy link
Member

No description provided.

@SumiranAgg SumiranAgg requested a review from asranja February 18, 2020 07:35
@@ -23,7 +23,7 @@ async function main() {

// Initialize action inputs
let endpoint: IAuthorizer = !!core.getInput('publish-profile') ? null : await AuthorizerFactory.getAuthorizer();
let actionParams: ActionParameters = ActionParameters.getActionParams(endpoint);
ActionParameters.getActionParams(endpoint);
Copy link
Contributor

Choose a reason for hiding this comment

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

required ?

@@ -33,9 +33,9 @@ export function validateAppDetails() {

if(!!actionParams.appName || (!!actionParams.slotName && actionParams.slotName !== 'production')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming there will not be an issue with case-sensitivity here.

Copy link
Member Author

Choose a reason for hiding this comment

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

This condition is to check default case, which we ourselves have set if user doesn't provide a value

let appNameMatch: boolean = !actionParams.appName || actionParams.appName === splitUsername[0];
let slotNameMatch: boolean = actionParams.slotName === 'production' || actionParams.slotName === splitUsername[1];
let splitUsername: string[] = creds.username.toUpperCase().substring(1).split("__");
let appNameMatch: boolean = !actionParams.appName || actionParams.appName.toUpperCase() === splitUsername[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not really required to specify type for all cases. Typescript will auto detect the type in most cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

It does but this is best practice. typescript by definition allows you to define types for your variables. Just trying to use that capability explicitly

@SumiranAgg SumiranAgg merged commit 9d9c315 into releases/v2 Feb 18, 2020
@SumiranAgg SumiranAgg deleted the users/suaggar/removePublishProfileFromLogs branch February 18, 2020 08:12
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.

3 participants