Skip to content

🚀 [Feature]: Manage Atlassian Confluence Cloud from PowerShell - #17

Merged
Marius Storhaug (MariusStorhaug) merged 41 commits into
mainfrom
feat/decompose-module
Jul 14, 2026
Merged

🚀 [Feature]: Manage Atlassian Confluence Cloud from PowerShell#17
Marius Storhaug (MariusStorhaug) merged 41 commits into
mainfrom
feat/decompose-module

Conversation

@MariusStorhaug

@MariusStorhaugMarius Storhaug (MariusStorhaug) commented Jul 7, 2026

Copy link
Copy Markdown
Member

Confluence is now a working PowerShell module: connect to an Atlassian Confluence Cloud site once and manage pages, spaces, blog posts, folders, comments, labels, content properties, attachments, and restrictions as first-class PowerShell commands. This first version ports the generalized Confluence REST v2 client into the PSModule source layout and wires it to the Process-PSModule build.

New: 41 Confluence commands

Grouped by resource area:

  • AuthConnect-Confluence, Disconnect-Confluence, Get-ConfluenceContext
  • ConfigGet-ConfluenceConfig, Set-ConfluenceConfig
  • APIInvoke-ConfluenceRestMethod (the single generic REST entry point every command wraps)
  • SpacesGet-ConfluenceSpace, Get-ConfluenceSpacePermission, Get-ConfluenceSpaceProperty, plus space administration: New-ConfluenceSpace (create), Update-ConfluenceSpace (partial update), Set-ConfluenceSpace (declarative create-or-replace), Remove-ConfluenceSpace (permanent, asynchronous delete)
  • Site / Pages / BlogPosts / Folders / Comments / Labels / ContentProperties / Attachments / Restrictions / Users — read/write commands per area; page edits use Update-ConfluencePage (renamed from Set-ConfluencePage, since it performs a partial update and the Set verb is reserved for declarative create-or-replace as in Set-ConfluenceSpace)

Each command documents its required OAuth granular scope in its help, and errors surface Atlassian's X-Failure-Category (for example FAILURE_CLIENT_SCOPE_CHECK) so permission/scope failures are easy to spot. Every command's help links to its documentation page (https://psmodule.io/Confluence/Functions/<Area>/<Command>/) followed by the relevant Atlassian API reference.

New: reusable connections via Context

Credentials and module configuration persist through the Context module, declared via #Requires so the build records it as a manifest dependency. Connect once — the token is stored as a SecureString. Store multiple sites or accounts as named contexts and target any of them with -Context.

$token=Read-Host-AsSecureString
Connect-Confluence-Site 'msxorg'-Username 'you@example.com'-Token $token-SpaceKey 'DOCS'$space=Get-ConfluenceSpace-Key 'DOCS'New-ConfluencePage-SpaceId $space.id-Title 'Release notes'-Body '<p>Hello</p>'

How it is built

  • One function per file under src/functions/{public,private}, grouped by resource area; module state in src/variables/private.
  • No header.ps1 and no source manifest.psd1 — the build generates the manifest, derives the module tags from the repository topics, and reads the #Requires (PowerShell 7.0 and Context) from the source.
  • Comment-based help follows the GitHub module style: indented sections, fenced examples, and a documentation-page .LINK first.
  • Examples (Connecting, Pages) and a credential-free surface test, plus a skipped integration scaffold that reads CONFLUENCE_* environment secrets. Tests require Pester 6.x.

Tests and secrets

No tenant-specific data is included — examples use generic placeholders. The integration tests are skipped unless connection details are provided through the repository's Actions secret and variables (CONFLUENCE_SITE, CONFLUENCE_USERNAME, CONFLUENCE_API_TOKEN, CONFLUENCE_SPACE_KEY), which this PR wires into the Process-PSModule workflow through TestData. Each public function also carries a #SkipTest:FunctionTest marker so the framework's source-code test suite passes while per-function tests are deferred.

Technical details

… layout
Implements the first working version of the module by porting the generalized Confluence REST v2 client and decomposing it into the PSModule one-function-per-file source layout.
- 35 public functions grouped by resource area (Auth, Config, API, Spaces, Site, Pages, BlogPosts, Folders, Comments, Labels, ContentProperties, Attachments, Restrictions, Users)
- 4 private helpers (Auth, Config); module state in variables/private
- Declares a dependency on the Context module via #Requires in header.ps1 (RequiredVersion 8.1.6), following the GitHub module pattern; credentials/config persist in the 'PSModule.Confluence' context vault
- Removes the template scaffold placeholders; adds Connecting/Pages examples and a credential-free surface test plus a skipped integration scaffold that reads connection details from environment secrets
- No tenant-specific data is included; examples use generic placeholders
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNPass ✅
NATURAL_LANGUAGEPass ✅
POWERSHELLFail ❌
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

Super-linter detected linting errors

For more information, see the GitHub Actions workflow run

Powered by Super-linter

POWERSHELL

�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseDeclaredVarsMoreThanAssignment Warning Pages.ps1 25 The variable
s 'child' is as
signed but ne
ver used.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning Confluence 73 Line exceeds
.Tests.ps1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidUsingConvertToSecureStringWi Error Confluence 72 File 'Conflue
thPlainText .Tests.ps1 nce.Tests.ps1
' uses Conver
tTo-SecureStr
ing with plai
ntext. This w
ill expose se
cure informat
ion. Encrypte
d standard st
rings should
be used inste
ad.

- Drop the unused child-page variable in the Pages example
- Splat Connect-Confluence in the integration test to stay within the line-length limit
- Suppress PSAvoidUsingConvertToSecureStringWithPlainText (the API token is a CI environment secret)
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNPass ✅
NATURAL_LANGUAGEPass ✅
POWERSHELLPass ✅
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

…point
The oversized module design comment lived only in header.ps1. Drop the file and relocate the two #Requires statements (PowerShell 7.0 and Context 8.1.6) to the top of Invoke-ConfluenceRestMethod.ps1 — the core function that every command routes through — so the build still generates the manifest's RequiredModules and PowerShellVersion. The framework injects the default CmdletBinding/param header when header.ps1 is absent.
The build generates the full manifest, and when the source manifest has no tags it collects them from the repository topics (Build-PSModuleManifest reads repositoryTopics). Repo topics set: confluence, atlassian, psmodule, powershell, powershell-module, pwsh, rest, rest-api. A missing source manifest is fully supported (the build starts from an empty manifest and derives version, description, project/license/icon URIs, and exports).
@MariusStorhaugMarius Storhaug (MariusStorhaug) added the minor Minor change, version 0.x.0 increase label Jul 7, 2026
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNPass ✅
NATURAL_LANGUAGEPass ✅
POWERSHELLPass ✅
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

…d to its docs page
Indent the help sections and add blank lines between them, wrap examples in fenced powershell blocks with a short description, and make the first .LINK each public command's documentation page (https://psmodule.io/Confluence/Functions/<Area>/<Command>/). Atlassian API references follow as additional .LINK entries. Private helpers are indented too but keep no docs link.
Keeps the implemented-module README over main's placeholder, keeps PSModuleTest.Tests.ps1 removed (replaced by Confluence.Tests.ps1), applies the Pester 6.x requirement from #16 to Confluence.Tests.ps1, and picks up the Process-PSModule workflow bump to v5.5.7.
@MariusStorhaugMarius Storhaug (MariusStorhaug) changed the title 🚀 [Feature]: Decompose the Confluence client into the PSModule source layout🚀 [Feature]: Manage Atlassian Confluence Cloud from PowerShellJul 7, 2026
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNPass ✅
NATURAL_LANGUAGEPass ✅
POWERSHELLPass ✅
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

Test-SourceCode requires a test for every public function; integration tests are deferred until the repository's Confluence credentials are configured, so mark each public function with #SkipTest:FunctionTest and a reason. Build-Docs runs markdownlint on the generated docs, which flagged the bare Confluence API URL in the Connect-Confluence -ApiBaseUri help — escape it with backticks (MD034).
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNPass ✅
NATURAL_LANGUAGEPass ✅
POWERSHELLPass ✅
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

Add SCOPES.md: the full granular Confluence scope set (22 scopes: 12 read, 6 write, 4 delete) the module's commands use, ready to paste when creating or rotating a scoped (ATSTT) API token used with Basic auth against the API gateway. Each scope maps to the commands that need it. Linked from the README.
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNPass ✅
NATURAL_LANGUAGEPass ✅
POWERSHELLPass ✅
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

…dule TestSecrets/TestVariables
Replaces secrets: inherit with an explicit declaration of exactly what the module tests need: CONFLUENCE_API_TOKEN via TestSecrets (masked) and CONFLUENCE_API_BASE_URI / CONFLUENCE_USERNAME / CONFLUENCE_SPACE_KEY via TestVariables (not masked). Pinned to the Process-PSModule feature branch (PR #365) until it is released.
Comment thread.github/workflows/Process-PSModule.yml Fixed
@github-actions

github-actionsBot commented Jul 8, 2026

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNPass ✅
NATURAL_LANGUAGEPass ✅
POWERSHELLPass ✅
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

…OPES.md
Updates SCOPES.md to the 48 granular scopes currently configured (25 read, 14 write, 9 delete), grouped by verb. Keeps the current-command mapping, flags that read:blogpost:confluence is no longer configured (Get-ConfluenceBlogPost would 403), and adds an "Additional scopes available for new commands" table listing candidate cmdlets the extra scopes unlock (custom content, databases, groups, users, restriction writes, analytics, comment updates, permission checks, configuration, space settings, embeds, whiteboard delete).
… cloud ID
New public function resolves an Atlassian Confluence Cloud site to its cloud ID via the public /_edge/tenant_info endpoint, so callers can supply a site name or URL (bare subdomain, host, or full URL; pipeline supported) instead of the cloud ID. Unauthenticated; no scope required. Also reverts an accidental Context->Get-Context edit in the test file and registers the command in the surface test.
… map
Connect-Confluence now takes -Site (name/host/URL, resolved to a cloud ID via the public tenant_info endpoint) or -CloudId (faster, direct); it builds the api.atlassian.com/ex/confluence/<cloudId> gateway base internally. Adds Get-ConfluenceAccessibleResource (lists sites/cloudIds/scopes a bearer token can reach) and an internal v1/v2 API-path map (v1 -> /wiki/rest/api, v2 -> /wiki/api/v2) usable via Invoke-ConfluenceRestMethod -ApiVersion. Integration test connects with -Site from CONFLUENCE_SITE.
…eCloudId; record token scopes on connect
- Rename ConvertTo-ConfluenceCloudId to Get-ConfluenceCloudId: the function
performs a GET against /_edge/tenant_info, so a Get- verb is accurate. Help,
examples, the Connect-Confluence reference, and the surface test are updated.
- Connect-Confluence now collects the token's scopes from the accessible-resources
endpoint and stores them on the context (Scopes), so callers can see what the
token can do. Collection is best-effort and never fails the connection.
…CodeQL-clean)
Adopt the combined TestData secret from Process-PSModule: one object with
"secrets" (masked) and "variables" (not masked) instead of separate TestSecrets
and TestVariables. Reference the token with the direct "${{ secrets.X }}" form to
resolve the CodeQL "excessive secrets exposure" alert, and keep the blob on one
folded line so GitHub registers a single mask. Repin to the framework branch head.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR turns the repository into a functional Confluence Cloud PowerShell module, adding a context-backed connection model plus a generic REST invoker and a first set of resource cmdlets, with updated docs/examples and CI wiring.

Changes:

  • Adds Invoke-ConfluenceRestMethod as the core Confluence REST wrapper, plus Context-based connect/disconnect/config helpers.
  • Introduces public cmdlets across key Confluence resources (spaces, pages, folders, comments, labels, attachments, restrictions, etc.) and supporting private helpers/state.
  • Replaces placeholder scaffolding with real docs/examples, scopes documentation, a surface/integration test scaffold, and updated workflow secret/test-data handling.

Reviewed changes

Copilot reviewed 55 out of 55 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
tests/PSModuleTest.Tests.ps1Removes scaffold “hello world” test.
tests/Confluence.Tests.ps1Adds module surface tests and skipped integration scaffold driven by env vars.
src/variables/private/Confluence.ps1Introduces module state (vault name, API path map, default config).
src/scripts/loader.ps1Removes placeholder loader output.
src/init/initializer.ps1Removes placeholder initializer output.
src/header.ps1Removes placeholder header stub.
src/functions/public/Users/Get-ConfluenceCurrentUser.ps1Adds cmdlet to resolve current authenticated user via v1 endpoint.
src/functions/public/Spaces/Get-ConfluenceSpaceProperty.ps1Adds cmdlet to list/get space properties.
src/functions/public/Spaces/Get-ConfluenceSpacePermission.ps1Adds cmdlet to list space permission assignments.
src/functions/public/Spaces/Get-ConfluenceSpace.ps1Adds cmdlet to fetch a space by key/id with default context fallback.
src/functions/public/Site/Get-ConfluenceSiteInfo.ps1Adds cmdlet to return cloudId + browsable site URL probe.
src/functions/public/Site/Get-ConfluenceCloudId.ps1Adds cmdlet to resolve cloudId via public tenant_info endpoint.
src/functions/public/Restrictions/Get-ConfluenceRestriction.ps1Adds cmdlet to read page restrictions via v1 endpoint.
src/functions/public/Pages/Set-ConfluencePage.ps1Adds cmdlet to update a page (read current, increment version, PUT).
src/functions/public/Pages/Remove-ConfluencePage.ps1Adds cmdlet to trash/purge pages with optional recursive deletion of children.
src/functions/public/Pages/New-ConfluencePage.ps1Adds cmdlet to create pages (optionally under a parent).
src/functions/public/Pages/Get-ConfluencePageVersion.ps1Adds cmdlet to list page version history.
src/functions/public/Pages/Get-ConfluencePageChild.ps1Adds cmdlet to list direct child pages.
src/functions/public/Pages/Get-ConfluencePage.ps1Adds cmdlet to fetch a page with requested body format.
src/functions/public/Pages/Get-ConfluenceDescendant.ps1Adds cmdlet to list descendants with automatic pagination.
src/functions/public/Labels/Remove-ConfluenceLabel.ps1Adds cmdlet to remove a label from a page via v1 endpoint.
src/functions/public/Labels/Get-ConfluenceLabel.ps1Adds cmdlet to list labels on a page via v2 endpoint.
src/functions/public/Labels/Add-ConfluenceLabel.ps1Adds cmdlet to add labels via v1 endpoint with explicit JSON array payload.
src/functions/public/Get-PSModuleTest.ps1Removes scaffold public function.
src/functions/public/Folders/Remove-ConfluenceFolder.ps1Adds cmdlet to delete/trash a folder.
src/functions/public/Folders/New-ConfluenceFolder.ps1Adds cmdlet to create a folder (optional parent).
src/functions/public/Folders/Get-ConfluenceFolder.ps1Adds cmdlet to fetch a folder by id.
src/functions/public/ContentProperties/Set-ConfluenceContentProperty.ps1Adds cmdlet to create/update a content property with version increment.
src/functions/public/ContentProperties/Remove-ConfluenceContentProperty.ps1Adds cmdlet to delete a content property by id.
src/functions/public/ContentProperties/Get-ConfluenceContentProperty.ps1Adds cmdlet to list/get content properties by key.
src/functions/public/Config/Set-ConfluenceConfig.ps1Adds cmdlet to set and persist module config in the Context vault.
src/functions/public/Config/Get-ConfluenceConfig.ps1Adds cmdlet to read module config (whole or key).
src/functions/public/Comments/Remove-ConfluenceComment.ps1Adds cmdlet to delete footer comments by id.
src/functions/public/Comments/Get-ConfluenceComment.ps1Adds cmdlet to list footer comments on a page.
src/functions/public/Comments/Add-ConfluenceComment.ps1Adds cmdlet to create a footer comment.
src/functions/public/BlogPosts/Get-ConfluenceBlogPost.ps1Adds cmdlet to list/get blog posts.
src/functions/public/Auth/Get-ConfluenceContext.ps1Adds cmdlet to retrieve stored Confluence contexts/default context.
src/functions/public/Auth/Get-ConfluenceAccessibleResource.ps1Adds cmdlet to call accessible-resources with bearer token.
src/functions/public/Auth/Disconnect-Confluence.ps1Adds cmdlet to remove a stored context and clear default if needed.
src/functions/public/Auth/Connect-Confluence.ps1Adds cmdlet to resolve cloudId (optional), validate token, store context, set default.
src/functions/public/Attachments/Remove-ConfluenceAttachment.ps1Adds cmdlet to delete attachments by id.
src/functions/public/Attachments/Get-ConfluenceAttachment.ps1Adds cmdlet to list attachments for a page or get by id.
src/functions/public/Attachments/Add-ConfluenceAttachment.ps1Adds cmdlet to upload an attachment via multipart form.
src/functions/public/API/Invoke-ConfluenceRestMethod.ps1Adds core REST invoker (auth/header, pagination, error shaping, debug redaction).
src/functions/private/Config/Initialize-ConfluenceConfig.ps1Adds private config loader/backfill/persist logic.
src/functions/private/Config/ConvertTo-ConfluenceHashtable.ps1Adds helper to convert stored objects into mutable hashtables.
src/functions/private/Auth/Resolve-ConfluenceToken.ps1Adds helper to extract plaintext token from SecureString/string.
src/functions/private/Auth/Resolve-ConfluenceContext.ps1Adds helper to resolve context object/name/default into a usable context.
src/finally.ps1Removes placeholder “last loader” output.
SCOPES.mdAdds scope inventory and mapping from cmdlets to required Confluence scopes.
README.mdUpdates README from placeholder to install/usage/docs for the implemented module.
examples/Pages.ps1Adds example script for CRUD-ish page workflows plus labels/comments.
examples/General.ps1Removes unrelated scaffold example content.
examples/Connecting.ps1Adds example script for connecting and managing contexts/config.
.github/workflows/Process-PSModule.ymlUpdates workflow to pin a feature SHA and pass minimal secrets/test data.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadREADME.md Outdated
Comment threadexamples/Connecting.ps1 Outdated
Comment threadexamples/Connecting.ps1 Outdated
Comment thread.github/workflows/Process-PSModule.yml Outdated
Comment threadtests/Confluence.Tests.ps1
Comment threadSCOPES.md

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 1 comment.

Comment threadsrc/functions/public/Config/Set-ConfluenceConfig.ps1
Reject the reserved 'ID' config key and require PerPage to be a positive integer before persisting, so a caller cannot corrupt the stored configuration or feed an invalid v2 'limit' value into Invoke-ConfluenceRestMethod (review thread on Set-ConfluenceConfig L37).
CopilotAI review requested due to automatic review settings July 14, 2026 09:36

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 2 comments.

Comment threadsrc/functions/public/Labels/Remove-ConfluenceLabel.ps1
Comment threadsrc/functions/public/Pages/Remove-ConfluencePage.ps1
With -Recurse, child pages were deleted before the root page's ShouldProcess was evaluated, so declining the root -Confirm prompt (after confirming children) left a partially deleted subtree. Evaluate the root ShouldProcess first and only recurse once approved (suppressing the per-child prompt), while -WhatIf still enumerates the whole subtree. Verified the WhatIf/Confirm/normal control flow (review thread on Remove-ConfluencePage L67).

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 1 comment.

Comment threadsrc/functions/public/Spaces/Update-ConfluenceSpace.ps1
When -Description is omitted, Update-ConfluenceSpace read the current value via \.description.plain.value. 'description' is optional in the v2 space response, so for a space without one this either yielded nothing or would throw under Set-StrictMode. Navigate it defensively and fall back to an empty string so the preserve-existing-description behavior works for description-less spaces (review thread on Update-ConfluenceSpace L55).
CopilotAI review requested due to automatic review settings July 14, 2026 09:53

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 4 comments.

Comment threadsrc/functions/public/Pages/New-ConfluencePage.ps1 Outdated
Comment threadsrc/functions/public/Pages/Update-ConfluencePage.ps1
Comment threadsrc/functions/public/Pages/Update-ConfluencePage.ps1
Comment threadsrc/functions/public/Comments/Add-ConfluenceComment.ps1 Outdated
Clarify the -Body help for New-ConfluencePage, Update-ConfluencePage and Add-ConfluenceComment: the v2 API stores body.value as a string for every representation, and for atlas_doc_format the string is the ADF document serialized as JSON. The existing [string]\During review of #17, Copilot suggested that `Remove-ConfluenceLabel` add a `-Prefix` parameter (defaulting to `global`) and include it in the DELETE query.
The current behavior is correct for the common case: the v1 `DELETE /wiki/rest/api/content/{id}/label?name=<name>` endpoint defaults `prefix` to `global`, so removing a global label by name works. This is proven by the passing integration test in #17, which removes a label by name and then asserts it is no longer present on the page.
This issue tracks the optional enhancement of supporting non-`global` label prefixes (`my`, `team`, `system`) across the label cmdlets (`Add-ConfluenceLabel`, `Get-ConfluenceLabel`, `Remove-ConfluenceLabel`) by adding an optional `-Prefix` parameter, so labels with a non-default prefix can be managed. This is out of scope for #17, which delivers global-label management. handling is correct; this documents the expected input (review threads on atlas_doc_format handling).
CopilotAI review requested due to automatic review settings July 14, 2026 10:01

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 1 comment.

Comment threadsrc/functions/public/API/Invoke-ConfluenceRestMethod.ps1
When -ApiVersion was combined with an -ApiEndpoint that already carries the /wiki/... root, the version prefix was prepended again, producing a doubled path (e.g. /wiki/api/v2/wiki/api/v2/spaces). Skip prefixing for endpoints that are already absolute (full URL or /wiki/*) so both documented usage styles - a relative path with -ApiVersion, or a full /wiki path without it - work safely (review thread on Invoke-ConfluenceRestMethod L80).
CopilotAI review requested due to automatic review settings July 14, 2026 10:09

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated no new comments.

@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit f92c039 into mainJul 14, 2026
40 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the feat/decompose-module branch July 14, 2026 11:18
@github-actions

Copy link
Copy Markdown

✅ New release: PowerShell Gallery - Confluence 0.1.0

@github-actions

Copy link
Copy Markdown

✅ New release: GitHub - Confluence 0.1.0

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minorMinor change, version 0.x.0 increase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@MariusStorhaug@github-advanced-security