Skip to content

Commit cb7a453

Browse files
committed
Merge branch 'develop' into sqldatabase
2 parents 74660cc + 2d0bedb commit cb7a453

File tree

214 files changed

+602
-468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+602
-468
lines changed

.github/workflows/deploy-module.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
with:
3737
ref: ${{ github.head_ref }} # checkout the correct branch name
3838
fetch-depth: 0
39+
token: ${{ secrets.REPO_TOKEN }}
3940
- name: Install GitVersion
4041
uses: gittools/actions/gitversion/[email protected]
4142
with:
@@ -59,14 +60,15 @@ jobs:
5960
name: Deploy Module
6061
runs-on: ubuntu-latest
6162
needs:
62-
- Build_Stage_Package_Module
63+
- Build_Stage_Package_Module
6364
if: ${{ success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
6465
steps:
6566
- name: Checkout Code
6667
uses: actions/checkout@v3
6768
with:
6869
ref: ${{ github.head_ref }} # checkout the correct branch name
6970
fetch-depth: 0
71+
token: ${{ secrets.REPO_TOKEN }}
7072
- name: Download Build Artifact
7173
uses: actions/download-artifact@v4
7274
with:
@@ -78,6 +80,17 @@ jobs:
7880
env:
7981
GitHubToken: ${{ secrets.GitHubToken }}
8082
GalleryApiToken: ${{ secrets.GalleryApiToken }}
83+
- name: Merge main -> develop
84+
# This step merges the main branch into the develop branch after a successful deployment. This ensures that the develop branch includes the tag for the latest release.
85+
run: |
86+
git config --local user.email "[email protected]"
87+
git config --local user.name "Automated Jess Did this"
88+
git checkout main
89+
git pull
90+
git checkout develop
91+
git pull
92+
git merge --no-ff main -m "Auto-merge main back to dev"
93+
git push
8194
- name: Send Changelog PR
8295
shell: pwsh
8396
run: ./build.ps1 -tasks Create_ChangeLog_GitHub_PR

.github/workflows/pr.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
on:
22
pull_request:
33
branches:
4-
- main
54
- develop
65
paths-ignore:
76
- CHANGELOG.md

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [Unreleased]
77

8+
### Added
9+
- Added credits for authors to all functions and Unit tests to verify the existence of such tags #89
10+
11+
### Changed
12+
### Fixed
13+
### Deprecated
14+
### Removed
15+
### Security
16+
17+
## 0.22.0 - 20250609
18+
819
### Added
920

1021
- Introduced new PowerShell functions for managing Fabric workspaces, recovery points, configurations, tenant settings, and workspace identities.
@@ -43,7 +54,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4354
- Removed unnecessary or duplicate functions (e.g., `Get-AllFabricDatasetRefreshes`, `Get-AllFabricCapacities`).
4455
- Removed obsolete scripts and commented-out configuration paths.
4556
- Removed `Invoke-FabricAPIRequest` and replaced it by `Invoke-FabricRestMethodExtended`
46-
- Removed `Confirm-FabricAuthToken` and extended existing `Test-TokenExpired` using `EnableTokenRefresh` Feature Flag
57+
- Removed `Confirm-FabricAuthToken`
58+
- Renamed `Test-TokenExpired` to `Confirm-TokenState` and extended it using `EnableTokenRefresh` Feature Flag
4759
- Removed `Set-FabricApiHeaders` and merged the entire logic to `Connect-FabricAccount`
4860

4961
### Security

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mode: ContinuousDelivery
2-
next-version: 0.11.0
2+
next-version: 0.22.0
33
major-version-bump-message: '(breaking\schange|breaking|major)\b'
44
minor-version-bump-message: '(adds?|features?|minor)\b'
55
patch-version-bump-message: '\s?(fix|patch)'

helper/GetFunctionList.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
$path = ".\source\public"
22
$op = Get-ChildItem -Path $path -Recurse -Filter *.ps1 | Select-Object -ExpandProperty Name | Sort-Object
3-
#$op = $op | ForEach-Object { " ""$_""," }
4-
$op | Out-File '.\Output\FunctionList-main-public.txt'
3+
$op | Out-File '.\output\FunctionList-main-public.txt'
54

65
# Author Table
76
# This script generates a table of PowerShell script authors from the specified directory.
7+
$path = ".\source\public"
8+
$op = Get-ChildItem -Path $path -Recurse -Filter *.ps1
89
$authorTable = @{}
910
$op | ForEach-Object {
1011
$file = $_.FullName
@@ -18,7 +19,10 @@ $op | ForEach-Object {
1819
$authorTable[$name] = $null
1920
}
2021
}
21-
$authorTable
22+
$authorTable | ft -AutoSize
23+
$authorTable.GetEnumerator() | Where-Object { -not $_.Value } | ft -AutoSize
24+
25+
2226

2327
## Not a singular name option for functions (#26)
2428
Get-Command -Module FabricTools |where Name -like '*s'

source/Private/Test-TokenExpired.ps1 renamed to source/Private/Confirm-TokenState.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
Checks if the Fabric token is expired and logs appropriate messages.
44
55
.DESCRIPTION
6-
The `Test-TokenExpired` function checks the expiration status of the Fabric token stored in the `$FabricConfig.TokenExpiresOn` variable.
6+
The `Confirm-TokenState` function checks the expiration status of the Fabric token stored in the `$FabricConfig.TokenExpiresOn` variable.
77
If the token is expired, it logs an error message and provides guidance for refreshing the token.
88
Otherwise, it logs that the token is still valid.
99
1010
.EXAMPLE
11-
Test-TokenExpired
11+
Confirm-TokenState
1212
1313
Checks the token expiration status using session's `$FabricConfig` object.
1414
@@ -20,7 +20,7 @@ Checks the token expiration status using session's `$FabricConfig` object.
2020
.AUTHOR
2121
Tiago Balabuch
2222
#>
23-
function Test-TokenExpired {
23+
function Confirm-TokenState {
2424
[CmdletBinding()]
2525
param ()
2626

source/Public/Capacity/Get-FabricCapacities.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
This command retrieves all resources of type "Microsoft.Fabric/capacities" from all resource groups in all subscriptions.
2020
2121
.NOTES
22+
Author: Ioana Bouariu
23+
Imported into FabricTools April 2025
2224
Alias: Get-AllFabCapacities
2325
#>
2426
function Get-FabricCapacities {
@@ -34,7 +36,7 @@ function Get-FabricCapacities {
3436
# Initialize an array to store the results
3537
$res = @()
3638

37-
Test-TokenExpired
39+
Confirm-TokenState
3840

3941
# If a subscription ID is provided
4042
if ($subscriptionID) {
@@ -72,4 +74,3 @@ function Get-FabricCapacities {
7274
# Return the results
7375
return $res
7476
}
75-

source/Public/Capacity/Get-FabricCapacity.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
.NOTES
2525
- Requires `$FabricConfig` global configuration, including `BaseUrl` and `FabricHeaders`.
26-
- Calls `Test-TokenExpired` to ensure token validity before making the API request.
26+
- Calls `Confirm-TokenState` to ensure token validity before making the API request.
2727
2828
Author: Tiago Balabuch
2929
#>
@@ -46,7 +46,7 @@ function Get-FabricCapacity {
4646
}
4747

4848
# Ensure token validity
49-
Test-TokenExpired
49+
Confirm-TokenState
5050

5151
# Construct the API endpoint URL
5252
$apiEndpointURI = "capacities"

source/Public/Capacity/Get-FabricCapacityRefreshables.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ This example retrieves the top 5 refreshable capacities for the tenant.
1616
1717
.NOTES
1818
The function retrieves the PowerBI access token and makes a GET request to the PowerBI API to retrieve the top refreshable capacities. It then returns the 'value' property of the response, which contains the capacities.
19+
20+
Author: Ioana Bouariu
21+
1922
#>
2023

21-
# This function retrieves the top refreshable capacities for the tenant.
2224
# Define aliases for the function for flexibility.
2325
[Alias("Get-FabCapacityRefreshables")]
2426

@@ -28,7 +30,7 @@ The function retrieves the PowerBI access token and makes a GET request to the P
2830
[string]$top = 5
2931
)
3032

31-
Test-TokenExpired
33+
Confirm-TokenState
3234

3335
# Make a GET request to the PowerBI API to retrieve the top refreshable capacities.
3436
# The function returns the 'value' property of the response.

source/Public/Capacity/Get-FabricCapacitySkus.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ Specifies the capacity to retrieve information for. If not provided, all capacit
1919
.EXAMPLE
2020
Get-FabricCapacitySkus -capacity "exampleCapacity"
2121
Retrieves the fabric capacity information for the specified capacity.
22-
#>
23-
# Define aliases for the function for flexibility.
22+
23+
.NOTES
24+
25+
Author: Kamil Nowinski
26+
27+
#>
2428

2529
Param(
2630
[Parameter(Mandatory = $true)]
@@ -31,7 +35,7 @@ Retrieves the fabric capacity information for the specified capacity.
3135
[string]$capacity
3236
)
3337

34-
Test-TokenExpired
38+
Confirm-TokenState
3539

3640
#GET https://management.azure.com/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest/skus?api-version=2023-11-01
3741
$uri = "$($AzureSession.BaseApiUrl)/subscriptions/$subscriptionID/resourceGroups/$ResourceGroupName/providers/Microsoft.Fabric/capacities/$capacity/skus?api-version=2023-11-01"

0 commit comments

Comments
 (0)