-
Notifications
You must be signed in to change notification settings - Fork 0
Dockerize 202411 #4
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
base: main
Are you sure you want to change the base?
Conversation
…gement/AtlassianPowerKit into dockerize-202411
| $vaultPath = if ($env:OSMAtlassianProfilesVaultPath) { | ||
| $env:OSMAtlassianProfilesVaultPath | ||
| # Function to set the Atlassian Cloud API headers | ||
| function { |
Check failure
Code scanning / PSScriptAnalyzer
Missing name after function keyword. Error
| } | ||
| } | ||
| # Consolidated Set-AtlassianPowerKitProfile function | ||
| function Set-AtlassianPowerKitProfile { |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Set-AtlassianPowerKitProfile' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| [Parameter(Mandatory = $false)] | ||
| [string]$OSMProfileName, | ||
| [Parameter(Mandatory = $false)] | ||
| [switch]$Vault = $false |
Check warning
Code scanning / PSScriptAnalyzer
The parameter 'Vault' has been declared but not used. Warning
| $OSMUsername = Read-Host 'Enter Atlassian Username (email)' | ||
| $OSMUsername = $OSMUsername.Trim().ToLower() | ||
| $env:AtlassianPowerKit_AtlassianAPIUserName = $OSMUsername | ||
| } |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Set-AtlassianAPIHeaders' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| } | ||
|
|
||
| function Get-LevenshteinDistance { | ||
| function New-AtlassianPowerKitProfile { |
Check warning
Code scanning / PSScriptAnalyzer
Function 'New-AtlassianPowerKitProfile' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| #Write-Debug "Found required environment variable: $envVarNameKey already set." | ||
| $ENV_STATE = $null | ||
| & op item create --category 'Secure Note' --vault $1PASSWORD_VAULT --title $1PASSWORD_TITLE $1PASSWORD_FIELD="$(Get-Content $tempPath -Raw)" | Write-Debug | ||
| Write-Host "`n✅ Created new 1Password item '$opEntry'." |
Check warning
Code scanning / PSScriptAnalyzer
File 'AtlassianPowerKit-Shared.psm1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| } | ||
| Return $true | ||
| } | ||
| function Remove-AtlassianPowerKitProfile { |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Remove-AtlassianPowerKitProfile' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| } | ||
| function Remove-AtlassianPowerKitProfile { | ||
| param ( | ||
| [Parameter(Mandatory = $true)] |
Check failure
Code scanning / PSScriptAnalyzer
Parameter declarations are a comma-separated list of variable names with optional initializer expressions. Error
| } | ||
| function Remove-AtlassianPowerKitProfile { | ||
| param ( | ||
| [Parameter(Mandatory = $true)] |
Check failure
Code scanning / PSScriptAnalyzer
Missing ')' in function parameter list. Error
| } | ||
| function Remove-AtlassianPowerKitProfile { | ||
| param ( | ||
| [Parameter(Mandatory = $true)] |
Check warning
Code scanning / PSScriptAnalyzer
The parameter 'error' has been declared but not used. Warning
This pull request introduces several updates to the
AtlassianPowerKitmodule, including enhancements to Confluence page export functionality, the addition of new functions, and structural improvements. Key changes include the addition of a new submodule, updates to module manifests, and improvements to error handling and functionality in Confluence-related scripts.Submodule Addition:
htmltoadfto.gitmodulesfor handling HTML to Atlassian Document Format (ADF) conversions.Module Manifest Updates:
AtlassianPowerKit-Admin.psd1for theAtlassianPowerKitmodule, detailing module metadata, exported functions, and dependencies.Confluence Functionality Enhancements:
Export-ConfluencePageToMarkDownfunction to export Confluence pages to Markdown format (currently a placeholder).Set-AttachmentForConfluencePagefunction to upload attachments to Confluence pages.Export-ConfluencePageto support multiple formats (atlas_doc_format,storage) and improved file naming and return structure.DepthLimitfor recursive Confluence page export functions to10for better usability. [1] [2]Error Handling Improvements:
try-catchblocks across multiple functions, ensuring consistent error logging and debugging output. [1] [2] [3] [4] [5] [6] [7] [8]Function Renaming:
Set-ConfluencePageContenttoSet-AttachmentForConfluencePagein theAtlassianPowerKit-Confluence.psd1manifest for clarity.