Skip to content

Conversation

@mazhelez
Copy link
Collaborator

ADO pipeline for releasing BCContainerHelper module

Copy link
Contributor

Copilot AI commented Dec 15, 2025

@mazhelez I've opened a new pull request, #4067, to work on those changes. Once the pull request is ready, I'll request review from you.

The `$fullVersion` variable was only initialized in the preview release
branch, causing undefined variable errors for production releases.

**Changes:**
- Added `else` branch to set `$fullVersion = $version` for production
releases
- Variable now properly initialized in both code paths before use

```powershell
if (-not $ProductionRelease) {
    $previewSuffix = "preview$($env:BUILD_BUILDID)"
    $fullVersion = "$version-$previewSuffix"
}
else {
    $fullVersion = $version
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: mazhelez <[email protected]>
Copy link
Contributor

Copilot AI left a comment

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 9 out of 9 changed files in this pull request and generated 4 comments.


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

Copy link
Contributor

Copilot AI commented Dec 15, 2025

@mazhelez I've opened a new pull request, #4068, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Dec 15, 2025

@mazhelez I've opened a new pull request, #4069, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits December 15, 2025 13:37
Addresses feedback on #4066 regarding `Register-PSRepository -Default`
failing when the repository is already registered.

## Changes

- Check if PSGallery exists before attempting registration to prevent
duplicate registration errors
- Maintain error visibility for actual registration failures by only
suppressing errors on the existence check

```powershell
# Before
Register-PSRepository -Default

# After
if (-not (Get-PSRepository -Name 'PSGallery' -ErrorAction SilentlyContinue)) {
    Register-PSRepository -Default
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: mazhelez <[email protected]>
…4069)

Addresses feedback from PR #4066 to align module authorship with
PowerShell Gallery publishing standards per [Microsoft
documentation](https://learn.microsoft.com/en-us/powershell/gallery/how-to/publishing-packages/publishing-a-package).

## Changes

- Updated `Author` field from "Freddy Kristiansen" to "Microsoft" in 8
`.module.json` files
- Updated `Author` field from "Freddy Kristiansen" to "Microsoft" in 8
`.psd1` files
- Updated `# Generated by:` comments to "Microsoft" in all `.psd1` files

## Files Modified

**Module manifests:**
- `BcContainerHelper.{psd1,module.json}`
- `BC.{psd1,module.json}`
- `BC.ALGoHelper.{psd1,module.json}`
- `BC.AppSourceHelper.{psd1,module.json}`
- `BC.ArtifactsHelper.{psd1,module.json}`
- `BC.HelperFunctions.{psd1,module.json}`
- `BC.NuGetHelper.{psd1,module.json}`
- `BC.SaasHelper.{psd1,module.json}`

This ensures consistency with the
`.azuredevops/scripts/PrepareBCContainerHelperModule.ps1` script which
already sets `Author = "Microsoft"` during release preparation.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: mazhelez <[email protected]>
Copy link
Contributor

Copilot AI left a comment

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 18 out of 25 changed files in this pull request and generated 2 comments.


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

aholstrup1
aholstrup1 previously approved these changes Dec 15, 2025
Copy link
Contributor

Copilot AI left a comment

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 18 out of 25 changed files in this pull request and generated 8 comments.


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

@mazhelez mazhelez merged commit bab7b51 into main Dec 15, 2025
91 checks passed
@mazhelez mazhelez deleted the mazhelez/release-pipeline-v2 branch December 15, 2025 15:11
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