Skip to content

Conversation

@MWG-Logan
Copy link
Owner

@MWG-Logan MWG-Logan commented Nov 6, 2025

This pull request introduces significant improvements to the deployment workflows, updates key dependencies, enhances documentation, and makes minor functional refinements. The main focus is on automating and securing deployments for both the API and web front-end using GitHub Actions and Azure, as well as keeping the codebase up to date with the latest package versions.

Deployment automation and configuration:

  • Added .github/workflows/func-deploy.yml to automate building and deploying the .NET Azure Function App using OIDC authentication, supporting secure and streamlined CI/CD for the backend API.
  • Added .github/workflows/swa-deploy.yml to automate build and deployment of the Blazor WebAssembly front-end to Azure Static Web Apps, including PR-based previews and automatic closing of preview environments.
  • Introduced Bezalu.ProjectReporting.Web/wwwroot/staticwebapp.config.json to enforce authentication for API routes and configure Azure Static Web Apps login and 401 handling.

Dependency and SDK updates:

  • Upgraded key NuGet packages in Bezalu.ProjectReporting.API.csproj (Azure Functions Worker, Application Insights, SDK) and in Bezalu.ProjectReporting.Web.csproj (Markdig, Blazor WebAssembly) to latest stable versions for improved stability and compatibility. [1] [2]
  • Added configuration to ensure staticwebapp.config.json is copied to output directory for correct deployment.

Documentation and developer experience:

  • Expanded and clarified README.md for the API, adding more detailed instructions, endpoint examples, and operational notes to assist with onboarding and deployment. [1] [2] [3]

Functional and code quality improvements:

  • Refactored ticket notes truncation logic in the PDF generation to use a constant for maximum notes, improving maintainability. [1] [2]
  • Updated service worker to cache .webmanifest files for better offline support.

Cleanup:

  • Removed unused DTOs folder reference from the API project file.

- Removed unused DTOs folder reference in `Bezalu.ProjectReporting.API.csproj`.
- Replaced hardcoded values with `maxNotes` constant in `ProjectCompletionReportFunction.cs` for better readability and consistency.
- Reformatted `fileSave.js` to improve code clarity without functional changes.
- Added `.webmanifest` to offline cache in `service-worker.published.js` to support PWAs.
- Fixed syntax issue in `service-worker.published.js` by removing an extraneous closing bracket.
Copilot AI review requested due to automatic review settings November 6, 2025 15:12
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

This PR improves code maintainability through several focused changes: adds PWA manifest caching support, improves JavaScript formatting, replaces magic numbers with named constants, and removes unused project folder references.

  • Added .webmanifest file support to service worker cache patterns for PWA functionality
  • Refactored hardcoded numeric value to a named constant (maxNotes) in ticket notes display logic
  • Standardized code formatting in JavaScript file save utility

Reviewed Changes

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

File Description
service-worker.published.js Added /\.webmanifest$/ pattern to offline assets cache to support PWA manifest files
fileSave.js Improved code formatting with consistent indentation and spacing (no functional changes)
ProjectCompletionReportFunction.cs Replaced magic number 10 with named constant maxNotes for better maintainability
Bezalu.ProjectReporting.API.csproj Removed empty DTOs\ folder reference from project file

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

Copy link
Contributor

Copilot AI commented Nov 6, 2025

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

MWG-Logan and others added 11 commits December 19, 2025 17:22
…02.107 to 10.0.0 (#15)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Components.WebAssembly
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Initial plan

* Move maxNotes constant to method level for better organization

Co-authored-by: MWG-Logan <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: MWG-Logan <[email protected]>
…17)

---
updated-dependencies:
- dependency-name: Microsoft.Azure.Functions.Worker
  dependency-version: 2.51.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
updated-dependencies:
- dependency-name: Microsoft.Azure.Functions.Worker.Sdk
  dependency-version: 2.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
updated-dependencies:
- dependency-name: Markdig
  dependency-version: 0.44.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…to 2.50.0 (#18)

---
updated-dependencies:
- dependency-name: Microsoft.Azure.Functions.Worker.ApplicationInsights
  dependency-version: 2.50.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#22)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Components.WebAssembly
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add staticwebapp.config.json to project output

* Add staticwebapp.config.json for routing and auth

* Update Bezalu.ProjectReporting.Web/staticwebapp.config.json

Co-authored-by: Copilot <[email protected]>

* fix: Move staticwebapp.config.json to wwwroot directory

* fix: Change routes from object to array format

---------

Co-authored-by: Copilot <[email protected]>
…0-rc.2.25502.107 to 10.0.1 (#23)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Components.WebAssembly.DevServer
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update workflow for .NET 10 build and custom deployment

Refactored the GitHub Actions workflow to use .NET 10.0, added explicit restore/build/publish steps, and updated environment variables for optimized .NET builds. Changed deployment to use published output, skip internal builds, and set production branch to 'main'. Updated checkout and deployment actions, and cleaned up unused config and comments.

* Update workflow to build and deploy new project target

Changed the job name and PROJECT path in the GitHub Actions workflow to reference Bezalu.ProjectReporting.Web instead of MyAzureSWAProject, ensuring the correct project is built and deployed.

* Add dotnet workload restore step to build workflow

Added a "Workload Restore" step in the CI workflow to run `dotnet workload restore` after restoring project dependencies. This ensures all required .NET SDK workloads are available before build and publish steps.

* Update .NET restore step to restore all packages

Renamed the "Restore" step to "Package Restore" and changed the command from restoring a specific project to restoring all packages in the solution. This ensures dependencies for all projects are restored.

* Reorder restore steps in Azure pipeline workflow

Swapped the order of "Package Restore" and "Workload Restore" steps in the Azure pipeline YAML. "Workload Restore" now runs before "Package Restore" to improve build step sequencing. No other changes were made.

* Corrected API Readme MD Syntax

* Simplify .NET build workflow in Azure pipeline

Removed separate restore and build steps from the workflow. The publish step now performs the build directly by omitting the "--no-build" flag, streamlining the deployment process, and skipping some weird state problems.

* Updated SWA workflow, naming of workflows, and added OIDC based func workflow

* Tweaking SWA workflow to conform more closely to func

* fixing version scheme

* incorrect param syntax

* Replace SWA flow auth with OIDC

* permission correction

* Changing OIDC method

* swa fixes (f u github)

* replace SWA flow with MS Learn example

* Update SWA deployment workflow
@MWG-Logan MWG-Logan changed the title Refactor and enhance maintainability across files (#12) SDK, Workflow, Package, and docs updates Dec 23, 2025
@MWG-Logan MWG-Logan requested a review from Copilot December 23, 2025 21:30
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 8 out of 9 changed files in this pull request and generated 6 comments.


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

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://mango-river-0addcf70f-13.eastus2.2.azurestaticapps.net

@MWG-Logan MWG-Logan merged commit 703286e into main Dec 23, 2025
7 of 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.

2 participants