Skip to content

Retarget vendor badges to release status#3103

Open
DRSDavidSoft wants to merge 1 commit into
cmderdev:masterfrom
DRSDavidSoft:codex/vendor-release-badges
Open

Retarget vendor badges to release status#3103
DRSDavidSoft wants to merge 1 commit into
cmderdev:masterfrom
DRSDavidSoft:codex/vendor-release-badges

Conversation

@DRSDavidSoft

@DRSDavidSoft DRSDavidSoft commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Retarget README-discovered build badges to the updated release tag.
  • Verify the retargeted badge before using it; otherwise show .
  • Add release-specific badge alt text.
  • Link truncated release-note TIPs to the full release notes.

Verification

Copilot AI review requested due to automatic review settings July 1, 2026 02:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the vendor-update GitHub Actions workflow to show build-status badges that are specifically associated with each vendor release tag in the autogenerated “Update vendored dependencies” PR table, with validation and a fallback when the official README badge can’t represent that release ref.

Changes:

  • Add helpers to retarget common README badge patterns (GitHub Actions + Azure DevOps) to a release tag and set explicit alt text for release association.
  • Validate retargeted badges by fetching the SVG and rejecting unusable states (e.g., no status, never built), falling back when needed.
  • Update vendor PR table generation to use the new release-aware badge selection logic.

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

Comment on lines +303 to 307
$RepoPath = $ReleaseInfo.RepoPath

try {
$readme = Invoke-GitHubApi -Uri "https://api.github.com/repos/$RepoPath/readme"
if ([string]::IsNullOrWhiteSpace($readme.content)) {
Comment on lines +229 to +236
if ($image -match '(?i)^https://dev\.azure\.com/.+/_apis/build/status' -or $target -match '(?i)^https://dev\.azure\.com/.+/_build/') {
if ($image -match '(?i)^https://dev\.azure\.com/.+/_apis/build/status') {
$image = Set-UrlQueryParameter -Url $image -Name 'branchName' -Value $tagName
$retargeted = $true
}
if ($target -match '(?i)^https://dev\.azure\.com/.+/_build/') {
$target = Set-UrlQueryParameter -Url $target -Name 'branchName' -Value $tagName
}
@DRSDavidSoft DRSDavidSoft force-pushed the codex/vendor-release-badges branch from 602d670 to 75ea898 Compare July 1, 2026 02:40
@DRSDavidSoft DRSDavidSoft force-pushed the codex/vendor-release-badges branch from 75ea898 to b9ca48f Compare July 1, 2026 02:45
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