Skip to content

fix: sanitize labels correctly when using enviornment variables#5010

Merged
mergify[bot] merged 2 commits into
GitTools:mainfrom
robertcoltheart:bug/fix-bad-semver-labels
Jul 2, 2026
Merged

fix: sanitize labels correctly when using enviornment variables#5010
mergify[bot] merged 2 commits into
GitTools:mainfrom
robertcoltheart:bug/fix-bad-semver-labels

Conversation

@robertcoltheart

Copy link
Copy Markdown
Contributor

Description

Using {BranchName} formatting for labels correctly removes slashes and other non-compliant characters, but environment variables do not have the same sanitization applied. This fixes this to apply to environment variables as well.

Related Issue

Resolves #5009

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@robertcoltheart robertcoltheart marked this pull request as draft July 2, 2026 10:31
@robertcoltheart robertcoltheart marked this pull request as ready for review July 2, 2026 10:37
@arturcic

arturcic commented Jul 2, 2026

Copy link
Copy Markdown
Member

@robertcoltheart please rebase your changes onto main, and I will get it merged

@robertcoltheart robertcoltheart force-pushed the bug/fix-bad-semver-labels branch from 614d1fc to 2335da8 Compare July 2, 2026 10:52
@arturcic arturcic enabled auto-merge July 2, 2026 10:55
@arturcic

arturcic commented Jul 2, 2026

Copy link
Copy Markdown
Member

hey @robertcoltheart mind to check why the tests are failing?

auto-merge was automatically disabled July 2, 2026 11:51

Head branch was pushed to by a user without write access

@mergify

mergify Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@arturcic

arturcic commented Jul 2, 2026

Copy link
Copy Markdown
Member

@Mergifyio queue

@mergify

mergify Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

🛑 Queue command has been cancelled

@mergify mergify Bot added the queued label Jul 2, 2026
mergify Bot added a commit that referenced this pull request Jul 2, 2026
@arturcic arturcic force-pushed the bug/fix-bad-semver-labels branch from 784e096 to ba1a715 Compare July 2, 2026 12:59
@arturcic arturcic enabled auto-merge July 2, 2026 12:59
@arturcic

arturcic commented Jul 2, 2026

Copy link
Copy Markdown
Member

@Mergifyio refresh

1 similar comment
@arturcic

arturcic commented Jul 2, 2026

Copy link
Copy Markdown
Member

@Mergifyio refresh

@mergify

mergify Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

refresh

✅ Pull request refreshed

1 similar comment
@mergify

mergify Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

refresh

✅ Pull request refreshed

@mergify mergify Bot removed the queued label Jul 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

@arturcic

arturcic commented Jul 2, 2026

Copy link
Copy Markdown
Member

@Mergifyio queue

@mergify

mergify Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-02 13:47 UTC · Rule: default · triggered by @arturcic with the @mergifyio queue command
  • Checks skipped · PR is already up-to-date
  • Merged2026-07-02 13:47 UTC · at ba1a7154a3a3e1b9da5e4aa30e5c19f37375b86b · merge

This pull request spent 25 seconds in the queue, including 3 seconds running CI.

Required conditions to merge
  • github-review-approved [🛡 GitHub repository ruleset rule main branch rule]
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/DotNet Format
    • check-neutral = @github-actions/DotNet Format
    • check-skipped = @github-actions/DotNet Format
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Release
    • check-neutral = @github-actions/Release
    • check-skipped = @github-actions/Release
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Build & Test (new-cli)
    • check-neutral = @github-actions/Build & Test (new-cli)
    • check-skipped = @github-actions/Build & Test (new-cli)
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Build & Package / macos-26
    • check-neutral = @github-actions/Build & Package / macos-26
    • check-skipped = @github-actions/Build & Package / macos-26
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Build & Package / ubuntu-24.04
    • check-neutral = @github-actions/Build & Package / ubuntu-24.04
    • check-skipped = @github-actions/Build & Package / ubuntu-24.04
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Build & Package / windows-2025-vs2026
    • check-neutral = @github-actions/Build & Package / windows-2025-vs2026
    • check-skipped = @github-actions/Build & Package / windows-2025-vs2026
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / macos-26 - net10.0
    • check-neutral = @github-actions/Test / macos-26 - net10.0
    • check-skipped = @github-actions/Test / macos-26 - net10.0
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / macos-26 - net8.0
    • check-neutral = @github-actions/Test / macos-26 - net8.0
    • check-skipped = @github-actions/Test / macos-26 - net8.0
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / macos-26 - net9.0
    • check-neutral = @github-actions/Test / macos-26 - net9.0
    • check-skipped = @github-actions/Test / macos-26 - net9.0
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / ubuntu-24.04 - net10.0
    • check-neutral = @github-actions/Test / ubuntu-24.04 - net10.0
    • check-skipped = @github-actions/Test / ubuntu-24.04 - net10.0
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / ubuntu-24.04 - net8.0
    • check-neutral = @github-actions/Test / ubuntu-24.04 - net8.0
    • check-skipped = @github-actions/Test / ubuntu-24.04 - net8.0
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / ubuntu-24.04 - net9.0
    • check-neutral = @github-actions/Test / ubuntu-24.04 - net9.0
    • check-skipped = @github-actions/Test / ubuntu-24.04 - net9.0
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / windows-2025-vs2026 - net10.0
    • check-neutral = @github-actions/Test / windows-2025-vs2026 - net10.0
    • check-skipped = @github-actions/Test / windows-2025-vs2026 - net10.0
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / windows-2025-vs2026 - net8.0
    • check-neutral = @github-actions/Test / windows-2025-vs2026 - net8.0
    • check-skipped = @github-actions/Test / windows-2025-vs2026 - net8.0
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @github-actions/Test / windows-2025-vs2026 - net9.0
    • check-neutral = @github-actions/Test / windows-2025-vs2026 - net9.0
    • check-skipped = @github-actions/Test / windows-2025-vs2026 - net9.0
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections
  • any of [🛡 GitHub repository ruleset rule main branch rule]:
    • check-success = @sonarqubecloud/SonarCloud Code Analysis
    • check-neutral = @sonarqubecloud/SonarCloud Code Analysis
    • check-skipped = @sonarqubecloud/SonarCloud Code Analysis

@mergify mergify Bot added the queued label Jul 2, 2026
@mergify mergify Bot merged commit a4c2b3c into GitTools:main Jul 2, 2026
121 checks passed
@mergify

mergify Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Thank you @robertcoltheart for your contribution!

@mergify mergify Bot removed the queued label Jul 2, 2026
This was referenced Jul 6, 2026
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.

[ISSUE]: Using environment variable with label can produce Semver incompatible labels

2 participants