Skip to content

Commit 3e5a051

Browse files
authored
Merge pull request #62 from dataplat/feature/changelog
Update PR Template and Enhance Changelog Guidance
2 parents bc9b596 + 3f0fb33 commit 3e5a051

File tree

6 files changed

+171
-21
lines changed

6 files changed

+171
-21
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
2424
After the description, please concisely list the changes as per keepachangelog.com
2525
This **should** duplicate what you've updated in the changelog file.
26+
27+
for example:
2628
2729
### Added
2830
- for new features [closes #15]
@@ -51,13 +53,9 @@
5153

5254
- [ ] The PR represents a single logical change. i.e. Cosmetic updates should go in different PRs.
5355
- [ ] Added an entry under the Unreleased section of in the CHANGELOG.md as per [format](https://keepachangelog.com/en/1.0.0/).
54-
- [ ] Local clean build passes without issue or fail tests (`build.ps1 -ResolveDependency`).
55-
- [ ] Resource documentation added/updated in README.md.
56-
- [ ] Resource parameter descriptions added/updated in README.md, schema.mof
57-
and comment-based help.
56+
- [ ] Local clean build passes without issue or fail tests (`build.ps1 -ResolveDependency -Tasks build, test`).
5857
- [ ] Comment-based help added/updated.
59-
- [ ] Localization strings added/updated in all localization files as appropriate.
6058
- [ ] Examples appropriately added/updated.
61-
- [ ] Unit tests added/updated. See [DSC Resource Testing Guidelines](https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md).
62-
- [ ] Integration tests added/updated (where possible). See [DSC Resource Testing Guidelines](https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md).
63-
- [ ] New/changed code adheres to [DSC Resource Style Guidelines](https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md) and [Best Practices](https://github.com/PowerShell/DscResources/blob/master/BestPractices.md).
59+
- [ ] Unit tests added/updated..
60+
- [ ] Integration tests added/updated (where possible).
61+
- [ ] Documentation added/updated (where applicable).
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
paths-ignore:
6+
- CHANGELOG.md
7+
- .vscode/**
8+
- .github/**
9+
- images/**
10+
- tests/**
11+
- '**.md'
12+
- '**.yml'
13+
tags:
14+
- '**'
15+
- '!*preview*'
16+
env:
17+
buildFolderName: output
18+
buildArtifactName: output
19+
20+
21+
name: Deploy Module
22+
# This workflow is triggered on push to the main branch and deploys the module to the PowerShell Gallery and creates a GitHub Release.
23+
jobs:
24+
Build_Stage_Package_Module:
25+
name: Package Module
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout Code
29+
uses: actions/checkout@v3
30+
with:
31+
ref: ${{ github.head_ref }} # checkout the correct branch name
32+
fetch-depth: 0
33+
- name: Install GitVersion
34+
uses: gittools/actions/gitversion/setup@v0.9.15
35+
with:
36+
versionSpec: 5.x
37+
- name: Evaluate Next Version
38+
uses: gittools/actions/gitversion/execute@v0.9.15
39+
with:
40+
configFilePath: GitVersion.yml
41+
- name: Build & Package Module
42+
shell: pwsh
43+
run: ./build.ps1 -ResolveDependency -tasks pack
44+
env:
45+
ModuleVersion: ${{ env.gitVersion.MajorMinorPatch }}
46+
- name: Publish Build Artifact
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: ${{ env.buildArtifactName }}
50+
path: ${{ env.buildFolderName }}/
51+
52+
Deploy_Stage_Deploy_Module:
53+
name: Deploy Module
54+
runs-on: ubuntu-latest
55+
needs:
56+
- Build_Stage_Package_Module
57+
if: ${{ success() && (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) }}
58+
steps:
59+
- name: Checkout Code
60+
uses: actions/checkout@v3
61+
with:
62+
ref: ${{ github.head_ref }} # checkout the correct branch name
63+
fetch-depth: 0
64+
- name: Download Build Artifact
65+
uses: actions/download-artifact@v4
66+
with:
67+
name: ${{ env.buildArtifactName }}
68+
path: ${{ env.buildFolderName }}
69+
- name: Publish Release
70+
shell: pwsh
71+
run: ./build.ps1 -tasks publish
72+
env:
73+
GitHubToken: ${{ secrets.GitHubToken }}
74+
GalleryApiToken: ${{ secrets.GalleryApiToken }}
75+
- name: Send Changelog PR
76+
shell: pwsh
77+
run: ./build.ps1 -tasks Create_ChangeLog_GitHub_PR
78+
env:
79+
GitHubToken: ${{ secrets.GitHubToken }}
80+
GalleryApiToken: ${{ secrets.GalleryApiToken }}
81+
ReleaseBranch: main
82+
MainGitBranch: main

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ on:
22
pull_request:
33
branches:
44
- main
5-
- sampler # temporary branch for testing
65
- develop
76
paths-ignore:
87
- CHANGELOG.md
8+
name: Build and Test Module for Pull Request
99
env:
1010
buildFolderName: output
1111
buildArtifactName: output

CHANGELOG.md

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

88
### Added
99

10+
- Introduced new PowerShell functions for managing Fabric workspaces, recovery points, configurations, tenant settings, and workspace identities.
11+
- Added unit tests for key functions, including `Get-FabricAPIclusterURI` and `Get-FabricCapacityTenantOverrides`.
12+
- Added standard tests for each function and enhanced Help tests to filter by exported commands.
13+
- Added OutputType attributes to several functions for improved type safety.
14+
- Added support for WhatIf and Confirm parameters to update and revoke functions.
15+
- Added Contributor Covenant Code of Conduct and enhanced contributing guidelines.
16+
- Added commit message guidelines for contributors using GitHub Copilot.
17+
18+
### Changed
19+
20+
- Refactored `Get-FabricAPIClusterURI` to use `Invoke-FabricRestApi` for improved consistency.
21+
- Updated validation pattern for `WorkspaceName` to allow additional special characters, then removed the pattern for greater flexibility.
22+
- Improved documentation for many functions, especially around parameters like `WorkspaceId`.
23+
- Refactored multiple functions for clarity, consistency, and maintainability.
24+
- Enhanced error handling and confirmation prompts (ShouldProcess) for potentially destructive actions.
25+
- Updated module manifest and build/test workflows for better automation and deployment.
26+
- Improved code formatting using the dbatools formatter.
27+
28+
### Fixed
29+
30+
- Fixed issues with `New-FabricDataPipeline` and its call to `Invoke-FabricAPIRequest`.
31+
- Fixed capital letter handling in test automation.
32+
- Fixed ResourceUrl for token retrieval in `Connect-FabricAccount`.
33+
- Fixed bugs in `New-FabricEventhouse` and improved ShouldProcess logic.
34+
- Fixed parameter naming and example formatting in several functions.
35+
36+
### Deprecated
37+
38+
- None.
39+
40+
### Removed
41+
42+
- Removed unnecessary or duplicate functions (e.g., `Get-AllFabricDatasetRefreshes`, `Get-AllFabricCapacities`).
43+
- Removed obsolete scripts and commented-out configuration paths.
44+
45+
### Security
46+
47+
- None.
48+
49+
---
50+
51+
**Contributors:**
52+
Rob Sewell, Jess Pomfret, Ioana Bouariu, Frank Geisler, Kamil Nowinski, and others.
53+
54+
**Note:**
55+
For a full list of changes and details, please see the commit history.
56+
57+
### Added
58+
1059
- For new features.
1160

1261
### Changed
@@ -28,4 +77,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2877
### Security
2978

3079
- In case of vulnerabilities.
31-

CONTRIBUTING.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,23 @@ The workflow for using this and developing the code is shown below.
8484
./build.ps1 -Tasks build,test
8585
```
8686

87-
8. Once you are happy with your code, push your branch to GitHub and create a PR against the repo.
87+
8. Once you are ready to submit your changes for review please ensure that you update the `CHANGELOG.md` file with a summary of your changes. This is important as it helps us keep track of what has changed in the module and makes it easier for users to see what has been added or changed.
88+
89+
You can use the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format for this.
90+
91+
Please add your changes under the `Unreleased` section and then create a new section for the next release. PLease use human readable titles for the changes, such as `Added`, `Changed`, `Fixed`, `Deprecated`, `Removed`, and `Security`.
92+
For example:
93+
94+
```markdown
95+
## [Unreleased]
96+
### Added
97+
- Added new function to manage Fabric workspaces.
98+
### Changed
99+
- Updated documentation for `Get-FabricAPIClusterURI`.
100+
### Fixed
101+
- Fixed issue with `New-FabricDataPipeline` not working correctly.
102+
```
103+
9. Once you are happy with your code and you have updated the changelog, push your branch to GitHub and create a PR against the repo.
88104

89105
## Thanks!
90106

build.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ BuildWorkflow:
7575
#- Merge_CodeCoverage_Files
7676

7777
publish:
78+
- Create_Release_Git_Tag
7879
- Publish_Release_To_GitHub # Runs first, if token is expired it will fail early
7980
# - Publish_GitHub_Wiki_Content
80-
8181
- publish_module_to_gallery
82+
- Create_Changelog_Branch
8283

8384
####################################################
8485
# PESTER Configuration #
@@ -120,15 +121,6 @@ Pester:
120121
#CodeCoverageFilePattern: JaCoCo_Merge.xml # the pattern used to search all pipeline test job artifacts
121122
#CodeCoverageMergedOutputFile: JaCoCo_coverage.xml # the file that is created for the merged code coverage
122123

123-
DscTest:
124-
ExcludeTag:
125-
- "Common Tests - New Error-Level Script Analyzer Rules"
126-
Tag:
127-
ExcludeSourceFile:
128-
- output
129-
ExcludeModuleFile:
130-
- Modules/DscResource.Common
131-
# - Templates
132124

133125
# Import ModuleBuilder tasks from a specific PowerShell module using the build
134126
# task's alias. Wildcard * can be used to specify all tasks that has a similar
@@ -152,3 +144,17 @@ TaskHeader: |
152144
Write-Build DarkGray " $Path"
153145
Write-Build DarkGray " $($Task.InvocationInfo.ScriptName):$($Task.InvocationInfo.ScriptLineNumber)"
154146
""
147+
####################################################
148+
# Changelog Configuration #
149+
####################################################
150+
ChangelogConfig:
151+
FilesToAdd:
152+
- 'CHANGELOG.md'
153+
UpdateChangelogOnPrerelease: false
154+
155+
####################################################
156+
# Git Configuration #
157+
####################################################
158+
GitConfig:
159+
UserName: Automation Bot
160+
UserEmail: automation_bot@fabrictools.io

0 commit comments

Comments
 (0)