Skip to content

Enable Get-FabricWorkspaceUser to accept pipeline input#128

Merged
jpomfret merged 8 commits intodevelopfrom
feature/singulartoplural1
Jun 17, 2025
Merged

Enable Get-FabricWorkspaceUser to accept pipeline input#128
jpomfret merged 8 commits intodevelopfrom
feature/singulartoplural1

Conversation

@SQLDBAWithABeard
Copy link
Contributor

Pull Request

Enable Get-FabricWorkspaceUser to accept pipeline input and rename for singularity

Pull Request (PR) description

  • Updated Get-FabricWorkspaceUser to support pipeline input for WorkspaceId and WorkspaceName parameters. Functions should accept input from the pipeline #75
  • Renamed Get-FabricWorkspaceUsers to match the singular form Function Naming #26
  • added unit tests for Get-FabricWorkspaceUser function to ensure it works correctly # with multiple workspaces both in the pipeline and passed to a parameter.
  • Added unit tests for Aliases for Get-FabricWorkspaceUser function to ensure backward compatibility.

New Unit tests to aid other contributors.
image

Tested with multiple workspaces passing to the workspace parameter
image
Tested with multiple workspaces passed along the pipeline

image
Tested with a workspaceid
image

Tested example that adds workspace to output

image

Task list

  • [ X] The PR represents a single logical change. i.e. Cosmetic updates should go in different PRs.
  • [ X] Added an entry under the Unreleased section of in the CHANGELOG.md as per format.
  • [ X] Local clean build passes without issue or fail tests (build.ps1 -ResolveDependency -Tasks build, test).
  • [ X] Comment-based help added/updated.
  • [ X] Examples appropriately added/updated.
  • [X ] Unit tests added/updated..
  • [ X] Code follows the contribution guidelines.

Build and Test succeeded locally

image

…75

Updated the Get-FabricWorkspaceUser function to enhance readability and maintainability. Added additional examples to the documentation for better user guidance. Improved the process block to handle multiple workspaces and return user details more effectively.

Thank you!
This commit introduces a comprehensive set of unit tests for the Get-FabricWorkspaceUser function. The tests validate parameter presence, alias functionality, and ensure correct behavior when handling multiple workspaces. This enhancement improves code reliability and maintainability.

Thank you!
Added unit tests for the `Get-FabricWorkspaceUser` function to ensure it operates correctly with multiple workspaces, both in the pipeline and as parameters. Updated the function to support pipeline input for `WorkspaceId` and `WorkspaceName`, and renamed `Get-FabricWorkspaceUsers` to its singular form for consistency.

Thank you!
Updated the test case to wrap the command in a script block for better readability and consistency. This change enhances the clarity of the test and aligns with best practices for PowerShell testing.

Thank you!
@github-actions
Copy link

github-actions bot commented Jun 15, 2025

Linux Test Results

4 572 tests   4 571 ✅  40s ⏱️
  407 suites      1 💤
    1 files        0 ❌

Results for commit 0f7d2fe.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jun 15, 2025

WinPS51 Test Results

4 777 tests   4 776 ✅  51s ⏱️
  408 suites      1 💤
    1 files        0 ❌

Results for commit 0f7d2fe.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jun 15, 2025

WinPS71 Test Results

4 777 tests   4 776 ✅  52s ⏱️
  408 suites      1 💤
    1 files        0 ❌

Results for commit 0f7d2fe.

♻️ This comment has been updated with latest results.

should never be required but use lessons learned from the database code
Enhance the Get-FabricWorkspaceUser function to ensure that
it properly checks for null responses from the PowerBI API
before adding users to the return value. This change improves
the robustness of the function and prevents potential errors
when no users are returned.

Thank you!
Copy link
Contributor

@NowinskiK NowinskiK left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@NowinskiK NowinskiK requested a review from jpomfret June 17, 2025 01:46
Copy link
Contributor

@jpomfret jpomfret left a comment

Choose a reason for hiding this comment

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

LGTM

@jpomfret jpomfret merged commit 1e3e51d into develop Jun 17, 2025
8 checks 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.

3 participants