Skip to content

Fix CodeQL check name mismatch blocking Dependabot and future PRs#69

Merged
Chris-Wolfgang merged 3 commits intodependabot/nuget/dotnet-dependencies-ff70e400d0from
copilot/sub-pr-67
Feb 28, 2026
Merged

Fix CodeQL check name mismatch blocking Dependabot and future PRs#69
Chris-Wolfgang merged 3 commits intodependabot/nuget/dotnet-dependencies-ff70e400d0from
copilot/sub-pr-67

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 28, 2026

Description

The codeql.yml job used a matrix strategy with language: ['csharp']. GitHub Actions appends matrix values to job names, registering the check as "Security Scan (CodeQL) (csharp)" instead of the "Security Scan (CodeQL)" required by the branch protection ruleset. This caused every PR to be permanently blocked by branch protection even when all jobs passed and approvals were present.

Change:

  • Removed strategy.matrix from codeql.yml — only one language was ever in the matrix, so no functionality is lost
  • Hardcoded csharp directly in the init and analyze steps
  • Check run is now registered as exactly "Security Scan (CodeQL)", matching the branch protection requirement
# Before — matrix appends "(csharp)", creating name mismatch
strategy:
  matrix:
    language: [ 'csharp' ]
...
  uses: github/codeql-action/init@v3
  with:
    languages: ${{ matrix.language }}

# After — check name matches branch protection exactly
  uses: github/codeql-action/init@v3
  with:
    languages: csharp

Type of change

  • Bug fix

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

Additional context

Discovered while investigating why PR #67 (Dependabot bump of Meziantou.Analyzer) remained mergeable_state: blocked despite all CI jobs succeeding and code owner approval being present. The mismatch affects any PR in this repository until fixed on main.


💡 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 in the docs.

…rement

Co-authored-by: Chris-Wolfgang <210299580+Chris-Wolfgang@users.noreply.github.com>
Copilot AI changed the title [WIP] Update dotnet-dependencies group with latest version Fix CodeQL check name mismatch blocking Dependabot and future PRs Feb 28, 2026
@Chris-Wolfgang Chris-Wolfgang marked this pull request as ready for review February 28, 2026 19:43
Copilot AI review requested due to automatic review settings February 28, 2026 19:43
@Chris-Wolfgang Chris-Wolfgang merged commit a8b41f6 into dependabot/nuget/dotnet-dependencies-ff70e400d0 Feb 28, 2026
1 check passed
@Chris-Wolfgang Chris-Wolfgang deleted the copilot/sub-pr-67 branch February 28, 2026 19:44
Copy link
Copy Markdown
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 fixes a GitHub Actions check name mismatch that was blocking all PRs (including Dependabot PR #67) from merging. When a matrix strategy with a single language was used, GitHub Actions appended (csharp) to the job name, registering the check as "Security Scan (CodeQL) (csharp)" instead of the exact string "Security Scan (CodeQL)" required by the branch protection ruleset.

Changes:

  • Removed the single-language strategy.matrix block from the analyze job in codeql.yml
  • Hardcoded csharp directly in the init and analyze action with: blocks
  • Removed the now-redundant build-mode: none parameter and trailing whitespace as part of cleanup

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