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
23 changes: 23 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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
- dependencies
- title: Other Changes
labels:
- "*"
20 changes: 10 additions & 10 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: 9.0.x

- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool --version 5.12.0
uses: gittools/actions/gitversion/setup@v4.2.0
with:
versionSpec: '6.4.0'

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

- name: Restore Packages
run: dotnet restore "${{ env.solution-path }}"
Expand Down Expand Up @@ -84,22 +84,22 @@ jobs:
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner

- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool
uses: gittools/actions/gitversion/setup@v4.2.0
with:
versionSpec: '6.4.0'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
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.fontawesometaghelpers" /o:"iowacomputergurus-github" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /n:"AspNetCore Utilities Font Awesome Tag Helpers"
.\.sonar\scanner\dotnet-sonarscanner begin /k:"IowaComputerGurus_aspnetcore.utilities.fontawesometaghelpers" /o:"iowacomputergurus-github" /d:sonar.token="${{ env.SONAR_TOKEN }}" /n:"AspNetCore Utilities Font Awesome Tag Helpers"
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"
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ env.SONAR_TOKEN }}"
Comment on lines 95 to +105
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Script executed:

#!/bin/bash
# Read the workflow file to see full context around the SonarQube scanner usage
head -110 .github/workflows/ci-build.yml | tail -40

Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers


<shell_result>
Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers
Exit code: 0

stdout:

        with:
          path: ~\sonar\cache
          key: ${{ runner.os }}-sonar
          restore-keys: ${{ runner.os }}-sonar

      - name: Cache SonarCloud scanner
        id: cache-sonar-scanner
        uses: actions/cache@v4.3.0
        with:
          path: .\.sonar\scanner
          key: ${{ runner.os }}-sonar-scanner
          restore-keys: ${{ runner.os }}-sonar-scanner

      - name: Install SonarCloud scanner
        if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
        shell: powershell
        run: |
          New-Item -Path .\.sonar\scanner -ItemType Directory
          dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
          
      - name: Install GitVersion
        uses: gittools/actions/gitversion/setup@v4.2.0
        with:
          versionSpec: '6.4.0'

      - name: Determine Version
        id: gitversion
        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.fontawesometaghelpers" /o:"iowacomputergurus-github" /d:sonar.token="${{ env.SONAR_TOKEN }}" /n:"AspNetCore Utilities Font Awesome Tag Helpers"
          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"
          .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ env.SONAR_TOKEN }}"

</shell_result>


Script executed:

#!/bin/bash
# Check if there's any documentation or configuration files in the repo
fd -e md -e txt -e json | xargs rg -l "sonar" 2>/dev/null | head -10

Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers


<shell_result>
Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers
Exit code: 0

stdout:

README.md

</shell_result>


Script executed:

#!/bin/bash
# Check README for any SonarQube configuration details
cat README.md | grep -A 10 -B 10 -i sonar

Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers


<shell_result>
Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers
Exit code: 0

stdout:

# AspNetCore Font Awesome Tag Helpers ![](https://img.shields.io/github/license/iowacomputergurus/aspnetcore.utilities.fontawesometaghelpers.svg)

A collection of TagHelpers for ASP.NET Core that make utilizing the FontAwesome library easier to use for developers

![Build Status](https://github.com/IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers/actions/workflows/ci-build.yml/badge.svg)

![](https://img.shields.io/nuget/v/icg.aspnetcore.utilities.fontawesometaghelpers.svg) ![](https://img.shields.io/nuget/dt/icg.aspnetcore.utilities.fontawesometaghelpers.svg)

## SonarCloud Analysis

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=IowaComputerGurus_aspnetcore.utilities.fontawesometaghelpers&metric=alert_status)](https://sonarcloud.io/dashboard?id=IowaComputerGurus_aspnetcore.utilities.fontawesometaghelpers)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=IowaComputerGurus_aspnetcore.utilities.fontawesometaghelpers&metric=coverage)](https://sonarcloud.io/dashboard?id=IowaComputerGurus_aspnetcore.utilities.fontawesometaghelpers)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=IowaComputerGurus_aspnetcore.utilities.fontawesometaghelpers&metric=security_rating)](https://sonarcloud.io/dashboard?id=IowaComputerGurus_aspnetcore.utilities.fontawesometaghelpers)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=IowaComputerGurus_aspnetcore.utilities.fontawesometaghelpers&metric=sqale_index)](https://sonarcloud.io/dashboard?id=IowaComputerGurus_aspnetcore.utilities.fontawesometaghelpers)

## Usage Expecations

These tag helpers are only for markup display, your web project must properly include references to FontAwesome and must abide by all license and other requirements of FontAwesome for the functionality to be utilized here.  For more on how to include FontAwesome within your project please reference their documentation.


## Setup - Registering TagHelpers

You must modify your `_viewimports.cshtml` file by adding

</shell_result>


Fix inconsistent SonarQube scanner parameters: use sonar.token in both begin and end steps.

The workflow uses /d:sonar.token in the begin step (line 101) but /d:sonar.login in the end step (line 105). The sonar.login parameter is deprecated; use /d:sonar.login="${{ env.SONAR_TOKEN }}" should be /d:sonar.token="${{ env.SONAR_TOKEN }}" to match the begin step and align with modern SonarQube/SonarCloud authentication standards.

🤖 Prompt for AI Agents
.github/workflows/ci-build.yml around lines 95 to 105: the SonarQube scanner end
step uses the deprecated /d:sonar.login parameter while the begin step uses
/d:sonar.token; update the end step to use /d:sonar.token="${{ env.SONAR_TOKEN
}}" so both begin and end use the same modern sonar.token parameter for
authentication.

8 changes: 4 additions & 4 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
dotnet-version: 9.0.x

- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool --version 5.12.0
uses: gittools/actions/gitversion/setup@v4.2.0
with:
versionSpec: '6.4.0'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
with:
useConfigFile: true
uses: gittools/actions/gitversion/execute@v4.2.0
Comment on lines 27 to +34
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Script executed:

#!/bin/bash
# Find GitVersion configuration files in the repository
echo "=== Searching for GitVersion configuration files ==="
fd -e yml -e yaml | grep -iE 'gitversion|version' | head -20

Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers


<shell_result>
Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers
Exit code: 0

stdout:

=== Searching for GitVersion configuration files ===
GitVersion.yml

</shell_result>


Script executed:

#!/bin/bash
# Check the content of GitVersion.yml
echo "=== GitVersion.yml content ==="
cat -n GitVersion.yml

Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers


<shell_result>
Repository: IowaComputerGurus/aspnetcore.utilities.fontawesometaghelpers
Exit code: 0

stdout:

=== GitVersion.yml content ===
     1	mode: ContinuousDeployment
     2	next-version: 1.0.0
     3	branches: 
     4	  develop:
     5	    regex: develop
     6	    label: 'alpha'
     7	    increment: Patch
     8	    prevent-increment:
     9	      when-current-commit-tagged: true
    10	    source-branches: []
    11	  pull-request:
    12	    regex: ^(pull-requests|pull|pr)[\/-](?<Number>\d+)
    13	    label: 'pr{Number}'
    14	    increment: Patch
    15	    is-release-branch: false
    16	    source-branches: []
    17	ignore:
    18	  sha: []
    19	merge-message-formats: {}

</shell_result>


gittools/actions/gitversion execute v4.2.0 useConfigFile documentation


<web_search_result>
Summary: The GitTools GitVersion "execute" GitHub Action (v4.2.0) accepts a useConfigFile boolean input. Set useConfigFile: true to tell the action to load a GitVersion configuration file (default name GitVersion.yml) and useConfigFile: false (or omit) to run with GitVersion defaults. If true you can also specify configFilePath to point to a non‑standard location. Example usage:

  • uses: gittools/actions/gitversion/execute@v4.2.0
    with:
    useConfigFile: true
    configFilePath: GitVersion.yml

Documentation / examples: GitTools actions examples for the execute step and the GitHub Actions example showing useConfigFile/configFilePath. [1][2]

Sources:
[1] GitTools/actions — execute example (GitHub docs/examples). (github.com)
[2] Example GitHub Actions workflow using gittools/actions/gitversion/execute with useConfigFile and configFilePath. (gdservices.io)

Citations:


useConfigFile: true is required for GitVersion.yml to be recognized by the new GitHub Actions.

The web search confirms that gittools/actions/gitversion/execute@v4.2.0 requires explicit useConfigFile: true to load the GitVersion.yml configuration file. Without this parameter, the action uses GitVersion defaults and ignores your repository's configuration.

Since your repository contains a GitVersion.yml file with critical configuration (ContinuousDeployment mode, branch-specific versioning rules, alpha labels), the removal of useConfigFile: true is a breaking change. The new gittools/actions/gitversion/execute@v4.2.0 step must include:

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

Without this, custom versioning logic will be lost and the build will use default GitVersion behavior instead.

🤖 Prompt for AI Agents
.github/workflows/release-build.yml around lines 27 to 34: the GitVersion
execute action is missing useConfigFile: true so your repository GitVersion.yml
is ignored; update the "Determine Version" step to add a with section that sets
useConfigFile: true so the action loads and honors your repository's
GitVersion.yml configuration.


- name: Restore Packages
run: dotnet restore "${{ env.solution-path }}"
Expand Down
16 changes: 8 additions & 8 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
mode: ContinuousDeployment
next-version: 1.0.0
branches:
main:
regex: main
tag: 'alpha'
develop:
regex: develop
label: 'alpha'
increment: Patch
prevent-increment:
when-current-commit-tagged: true
source-branches: []
pull-request:
regex: (pull|pull\-requests|pr)[/-]
tag: 'pr'
tag-number-pattern: '[/-](?<number>\d+)[-/]'
regex: ^(pull-requests|pull|pr)[\/-](?<Number>\d+)
label: 'pr{Number}'
increment: Patch
prevent-increment-of-merged-branch-version: false
is-release-branch: false
source-branches: []
ignore:
sha: []
merge-message-formats: {}
merge-message-formats: {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading