Skip to content

function best practices #431

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

Merged
merged 2 commits into from
Jan 23, 2023
Merged

function best practices #431

merged 2 commits into from
Jan 23, 2023

Conversation

AdhocAdam
Copy link
Owner

@AdhocAdam AdhocAdam commented Jan 22, 2023

Standardizing functions used through the connector for consistency and to follow best practice as defined by PSScriptAnalzyer.

standardizing functions used through the connector to meet best practice as defined by PSScriptAnalyzer
@AdhocAdam AdhocAdam added this to the 5.x.x milestone Jan 22, 2023
@AdhocAdam AdhocAdam self-assigned this Jan 22, 2023
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [3] Warnings, ℹ️ [0] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2619
Message    : The parameter 'UserSamAccountName' has been declared but not used. 

RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2622
Message    : The parameter 'TierId' has been declared but not used. 

RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3441
Message    : The parameter 'MessageClass' has been declared but not used.

PSScriptAnalyzer currently has an issue when using parameters inside of [scriptblock] which is the basis for Test-EmailPattern and Get-TierMembership to perform their initial filtering.
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [0] Warnings, ℹ️ [0] Information


@AdhocAdam AdhocAdam marked this pull request as ready for review January 23, 2023 02:34
@AdhocAdam AdhocAdam merged commit a1061c3 into dev Jan 23, 2023
AdhocAdam added a commit that referenced this pull request Mar 11, 2023
* function best practices (#431)

* function best practices

standardizing functions used through the connector to meet best practice as defined by PSScriptAnalyzer

* PSScriptAnalyzer, warning suppression

PSScriptAnalyzer currently has an issue when using parameters inside of [scriptblock] which is the basis for Test-EmailPattern and Get-TierMembership to perform their initial filtering.

* ensure single work item returned (#432)

proposed fix to ensure the most recently modified work item with an attachment that matches the conversation id is used

* Exchange documentation (#436)

providing notes on what the section of Exchange code does

* Additional logging (#437)

* take keyword logging

in the event a take action fails, log an event

* logging level logic

adding logic to ensure event only logs when the logging level is at least 2

* incorrect logging level

instead of 2 for warning, it should be 3 for error

* logging, AD Group Voting

Adding log events for ELSE conditions when Voting on behalf of AD Groups

* indent code block (#438)

Indent IF statement in the Review Activity section of Update-WorkItem

* code formatting

remove trailing whitespace

* Else, Custom Rules (#439)

In the event Custom Rules are not enabled and a message exists in the inbox that is NOT an email, meeting, or digitally signed/encrypted email. Log an event that explains why this event occurred and how to prevent it in the future.

* reviewing dev (#440)

* updating log message

Upon review, the only reason this section of could would be triggered is for the single condition of "Custom Rules are not enabled" instead of "Custom Rules not enabled + Unknown Message Class"

* function formatting/syntax

updating remaining functions to follow the consistency of the others featured throughout the connector with a param block, and notes detailing the purpose of each parameter

* Valid Reviewer logging (#441)

Introducing logging on Review Activities to capture if the sender of the email is in fact a valid Reviewer on the Review Activity

* release notes (#442)

* release notes

updating inline release notes for next version

* typo

found a typo when reviewing release notes
@AdhocAdam AdhocAdam deleted the dev-PSScriptAnalyzer branch March 11, 2023 18:27
AdhocAdam added a commit that referenced this pull request Mar 14, 2023
In #431 the $alias parameter was removed. This parameter is required to use Templates that have 1 or more Activities on them.
AdhocAdam added a commit that referenced this pull request Mar 14, 2023
In #431 the $alias parameter was removed. This parameter is required to use Templates that have 1 or more Activities on them.
@AdhocAdam AdhocAdam mentioned this pull request Mar 14, 2023
AdhocAdam added a commit that referenced this pull request Mar 14, 2023
In #431 the $alias parameter was removed. This parameter is required to use Templates that have 1 or more Activities on them.
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.

1 participant