Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
changelog:
exclude:
labels:
- question
- wontfix
- invalid
categories:
- title: Exciting New Features 🎉
labels:
- enhancement
- feature
- title: Squashed Bugs 🐛
labels:
- bug
- breaking-change
- title: Administrative
labels:
- administrative
- documentation
- title: Other Changes
labels:
- "*"
16 changes: 7 additions & 9 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
dotnet-version: 8.0.x

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.1.1
uses: gittools/actions/gitversion/setup@v4.2.0
with:
versionSpec: '6.0.5'
versionSpec: '6.4.0'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v3.1.1
uses: gittools/actions/gitversion/execute@v4.2.0
with:
useConfigFile: true

Expand Down Expand Up @@ -81,23 +81,21 @@ jobs:
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.1.1
uses: gittools/actions/gitversion/setup@v4.2.0
with:
versionSpec: '6.0.5'
versionSpec: '6.4.0'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v3.1.1
with:
useConfigFile: true
uses: gittools/actions/gitversion/execute@v4.2.0

- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"IowaComputerGurus_aspnetcore.utilities" /o:"iowacomputergurus-github" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /n:"AspNetCore Utilities"
.\.sonar\scanner\dotnet-sonarscanner begin /k:"IowaComputerGurus_aspnetcore.utilities" /o:"iowacomputergurus-github" /d:sonar.login="${{ env.SONAR_TOKEN }}" /n:"AspNetCore Utilities"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Sonar token handling is inconsistent between begin and end steps.

Line 98 uses env.SONAR_TOKEN for the scanner begin operation, but line 102 uses secrets.SONAR_TOKEN for the end operation. Since the environment variable is set from the GitHub secret on line 95, this inconsistency should be harmless in practice, but using the same source throughout is clearer. Standardize both steps to use env.SONAR_TOKEN for consistency.

Apply this diff to use the same token source in both steps:

-          .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
+          .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ env.SONAR_TOKEN }}"

Also applies to: 102-102

🤖 Prompt for AI Agents
.github/workflows/ci-build.yml around lines 98 and 102: the Sonar scanner steps
reference the token inconsistently (line 98 uses env.SONAR_TOKEN while line 102
uses secrets.SONAR_TOKEN); change the end step to use the same env.SONAR_TOKEN
variable as the begin step (standardize both steps to reference env.SONAR_TOKEN)
so both begin and end use the identical token source.

dotnet restore "${{ env.solution-path }}"
dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }}
dotnet test "${{ env.solution-path }}" --no-build --configuration Release --collect "XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover --logger "trx;LogFileName=unittests.trx"
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ jobs:
dotnet-version: 8.0.x

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.1.1
uses: gittools/actions/gitversion/setup@v4.2.0
with:
versionSpec: '6.0.5'
versionSpec: '6.4.0'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v3.1.1
with:
useConfigFile: true
uses: gittools/actions/gitversion/execute@v4.2.0

- name: Restore Packages
run: dotnet restore "${{ env.solution-path }}"
Expand Down
1 change: 0 additions & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ branches:
pull-request:
regex: (pull|pull\-requests|pr)[/-]
label: 'pr'
label-number-pattern: '[/-](?<number>\d+)[-/]'
increment: Patch
is-release-branch: false
source-branches: []
Expand Down
18 changes: 0 additions & 18 deletions src/AspNetCore.Utilities/DependencyResolution/StartupExtensions.cs

This file was deleted.

Loading