From b6128b936cba41c879032c7e2f657de79166cdff Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Wed, 18 Mar 2026 09:56:43 +0800 Subject: [PATCH 01/12] Update version and download URLs to v0.0.246 in Homebrew formula --- Formula/modernize.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Formula/modernize.rb b/Formula/modernize.rb index 7071c7e..7c4bb74 100644 --- a/Formula/modernize.rb +++ b/Formula/modernize.rb @@ -1,22 +1,22 @@ class Modernize < Formula desc "AI-powered CLI for application modernization" homepage "https://github.com/microsoft/modernize-cli" - version "0.0.226" + version "0.0.246" if OS.mac? if Hardware::CPU.intel? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.226/modernize_0.0.226_darwin_x64.tar.gz" + url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_x64.tar.gz" sha256 "b18a7de04f36cb0236f122af0417110f9b2a7f7daa03ef6a130e8d837de7754e" elsif Hardware::CPU.arm? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.226/modernize_0.0.226_darwin_arm64.tar.gz" + url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_arm64.tar.gz" sha256 "786c7ae517a19c329702e977c0e871e3b503b31a87bc04f8024fabb18f6c7629" end elsif OS.linux? if Hardware::CPU.intel? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.226/modernize_0.0.226_linux_x64.tar.gz" + url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_x64.tar.gz" sha256 "fdc582131e933f8fbe978da7601c9d2cdf40044305adc93c668ab501dee11f58" elsif Hardware::CPU.arm? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.226/modernize_0.0.226_linux_arm64.tar.gz" + url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_arm64.tar.gz" sha256 "426b254c7808d8cdd482468b754815872993a85b4b9b2ed14871438700aa15fa" end end From 4aa2f659a0475a3e5ab9918106e893110cfb85d6 Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Wed, 18 Mar 2026 10:06:07 +0800 Subject: [PATCH 02/12] Update SHA256 checksums for macOS and Linux binaries in Homebrew formula --- Formula/modernize.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/modernize.rb b/Formula/modernize.rb index 7c4bb74..7a00b8b 100644 --- a/Formula/modernize.rb +++ b/Formula/modernize.rb @@ -6,18 +6,18 @@ class Modernize < Formula if OS.mac? if Hardware::CPU.intel? url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_x64.tar.gz" - sha256 "b18a7de04f36cb0236f122af0417110f9b2a7f7daa03ef6a130e8d837de7754e" + sha256 "4f8f46bfac505479e707211eb5b06cb20d480b1e695656245f5a613d17ff0a55" elsif Hardware::CPU.arm? url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_arm64.tar.gz" - sha256 "786c7ae517a19c329702e977c0e871e3b503b31a87bc04f8024fabb18f6c7629" + sha256 "8cb36ba5152948086b95478211b0ebaaa7204367b6fae7477a70fa38db83a9d0" end elsif OS.linux? if Hardware::CPU.intel? url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_x64.tar.gz" - sha256 "fdc582131e933f8fbe978da7601c9d2cdf40044305adc93c668ab501dee11f58" + sha256 "1264ecbc0187f5e59822f939702e96850069c28c62f6bd0e13622bae403ec381" elsif Hardware::CPU.arm? url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_arm64.tar.gz" - sha256 "426b254c7808d8cdd482468b754815872993a85b4b9b2ed14871438700aa15fa" + sha256 "a11429f057eadf0d0ae909306907ac7e5dccf859e90d7763abc2d92334c198e4" end end From 743a9becd6efc9dc79866324c607dc6922b33998 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Mar 2026 03:07:22 +0000 Subject: [PATCH 03/12] Update Homebrew formula to v0.0.246 --- Formula/modernize.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Formula/modernize.rb b/Formula/modernize.rb index 7a00b8b..b3e6f30 100644 --- a/Formula/modernize.rb +++ b/Formula/modernize.rb @@ -1,22 +1,22 @@ class Modernize < Formula desc "AI-powered CLI for application modernization" - homepage "https://github.com/microsoft/modernize-cli" + homepage "https://github.com/galiacheng/modernize-cli" version "0.0.246" if OS.mac? if Hardware::CPU.intel? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_x64.tar.gz" + url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_x64.tar.gz" sha256 "4f8f46bfac505479e707211eb5b06cb20d480b1e695656245f5a613d17ff0a55" elsif Hardware::CPU.arm? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_arm64.tar.gz" + url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_arm64.tar.gz" sha256 "8cb36ba5152948086b95478211b0ebaaa7204367b6fae7477a70fa38db83a9d0" end elsif OS.linux? if Hardware::CPU.intel? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_x64.tar.gz" + url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_x64.tar.gz" sha256 "1264ecbc0187f5e59822f939702e96850069c28c62f6bd0e13622bae403ec381" elsif Hardware::CPU.arm? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_arm64.tar.gz" + url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_arm64.tar.gz" sha256 "a11429f057eadf0d0ae909306907ac7e5dccf859e90d7763abc2d92334c198e4" end end @@ -34,4 +34,5 @@ def install assert_equal 0, $CHILD_STATUS.exitstatus assert_match "modernize", version_output end -end \ No newline at end of file +end + From 04be7928124f8a735bed8606b4a546ab418889ad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Mar 2026 03:09:22 +0000 Subject: [PATCH 04/12] Update Homebrew formula to v0.0.246 --- Formula/modernize.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Formula/modernize.rb b/Formula/modernize.rb index 7a00b8b..b3e6f30 100644 --- a/Formula/modernize.rb +++ b/Formula/modernize.rb @@ -1,22 +1,22 @@ class Modernize < Formula desc "AI-powered CLI for application modernization" - homepage "https://github.com/microsoft/modernize-cli" + homepage "https://github.com/galiacheng/modernize-cli" version "0.0.246" if OS.mac? if Hardware::CPU.intel? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_x64.tar.gz" + url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_x64.tar.gz" sha256 "4f8f46bfac505479e707211eb5b06cb20d480b1e695656245f5a613d17ff0a55" elsif Hardware::CPU.arm? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_arm64.tar.gz" + url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_arm64.tar.gz" sha256 "8cb36ba5152948086b95478211b0ebaaa7204367b6fae7477a70fa38db83a9d0" end elsif OS.linux? if Hardware::CPU.intel? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_x64.tar.gz" + url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_x64.tar.gz" sha256 "1264ecbc0187f5e59822f939702e96850069c28c62f6bd0e13622bae403ec381" elsif Hardware::CPU.arm? - url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_arm64.tar.gz" + url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_arm64.tar.gz" sha256 "a11429f057eadf0d0ae909306907ac7e5dccf859e90d7763abc2d92334c198e4" end end @@ -34,4 +34,5 @@ def install assert_equal 0, $CHILD_STATUS.exitstatus assert_match "modernize", version_output end -end \ No newline at end of file +end + From 242bfde1c3ae8bb5b1ed143e926f7c0a200b84d4 Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Wed, 18 Mar 2026 11:16:13 +0800 Subject: [PATCH 05/12] Add GitHub Actions workflow to validate Homebrew installation --- .github/workflows/validate-homebrew.yml | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/validate-homebrew.yml diff --git a/.github/workflows/validate-homebrew.yml b/.github/workflows/validate-homebrew.yml new file mode 100644 index 0000000..6674496 --- /dev/null +++ b/.github/workflows/validate-homebrew.yml @@ -0,0 +1,54 @@ +name: Validate Homebrew Installation + +on: + pull_request: + types: [closed] + +jobs: + validate-homebrew: + if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Update Homebrew formula') + strategy: + fail-fast: false + matrix: + include: + - os: macos-13 + name: macOS Intel + - os: macos-latest + name: macOS ARM64 + - os: ubuntu-latest + name: Linux x64 + - os: ubuntu-24.04-arm + name: Linux ARM64 + + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + + - name: Tap and install modernize + run: | + brew tap microsoft/modernize https://github.com/${{ github.repository }} + brew install modernize + + - name: Extract expected version from formula + id: formula + run: | + version=$(grep '^ version ' Formula/modernize.rb | sed 's/.*"\(.*\)".*/\1/') + echo "version=$version" >> "$GITHUB_OUTPUT" + echo "Expected version: $version" + + - name: Verify installation + run: | + output=$(modernize --version) + echo "Version output: $output" + if echo "$output" | grep -q "${{ steps.formula.outputs.version }}"; then + echo "Version verified successfully" + else + echo "::error::Version mismatch. Expected '${{ steps.formula.outputs.version }}' in output but got: $output" + exit 1 + fi From 4b81b74db3187b43d5657ec7c380c4cdb96cfa48 Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Wed, 18 Mar 2026 11:17:57 +0800 Subject: [PATCH 06/12] Fix Homebrew tap command to use the correct repository reference --- .github/workflows/validate-homebrew.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-homebrew.yml b/.github/workflows/validate-homebrew.yml index 6674496..eed85c0 100644 --- a/.github/workflows/validate-homebrew.yml +++ b/.github/workflows/validate-homebrew.yml @@ -32,7 +32,7 @@ jobs: - name: Tap and install modernize run: | - brew tap microsoft/modernize https://github.com/${{ github.repository }} + brew tap ${{ github.repository }} https://github.com/${{ github.repository }} brew install modernize - name: Extract expected version from formula From 64616f4b0ddec1a566bbca750680b7c80208a6d9 Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Wed, 18 Mar 2026 11:24:54 +0800 Subject: [PATCH 07/12] Remove outdated macOS Intel job from Homebrew validation workflow --- .github/workflows/validate-homebrew.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/validate-homebrew.yml b/.github/workflows/validate-homebrew.yml index eed85c0..8eb329a 100644 --- a/.github/workflows/validate-homebrew.yml +++ b/.github/workflows/validate-homebrew.yml @@ -11,8 +11,6 @@ jobs: fail-fast: false matrix: include: - - os: macos-13 - name: macOS Intel - os: macos-latest name: macOS ARM64 - os: ubuntu-latest From 4c10584a85310854e0c88832a70d509816696471 Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Wed, 18 Mar 2026 11:26:58 +0800 Subject: [PATCH 08/12] Update homepage and download URLs to point to the correct Microsoft repository --- Formula/modernize.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Formula/modernize.rb b/Formula/modernize.rb index b3e6f30..fc75a0a 100644 --- a/Formula/modernize.rb +++ b/Formula/modernize.rb @@ -1,22 +1,22 @@ class Modernize < Formula desc "AI-powered CLI for application modernization" - homepage "https://github.com/galiacheng/modernize-cli" + homepage "https://github.com/microsoft/modernize-cli" version "0.0.246" if OS.mac? if Hardware::CPU.intel? - url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_x64.tar.gz" + url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_x64.tar.gz" sha256 "4f8f46bfac505479e707211eb5b06cb20d480b1e695656245f5a613d17ff0a55" elsif Hardware::CPU.arm? - url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_arm64.tar.gz" + url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_darwin_arm64.tar.gz" sha256 "8cb36ba5152948086b95478211b0ebaaa7204367b6fae7477a70fa38db83a9d0" end elsif OS.linux? if Hardware::CPU.intel? - url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_x64.tar.gz" + url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_x64.tar.gz" sha256 "1264ecbc0187f5e59822f939702e96850069c28c62f6bd0e13622bae403ec381" elsif Hardware::CPU.arm? - url "https://github.com/galiacheng/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_arm64.tar.gz" + url "https://github.com/microsoft/modernize-cli/releases/download/v0.0.246/modernize_0.0.246_linux_arm64.tar.gz" sha256 "a11429f057eadf0d0ae909306907ac7e5dccf859e90d7763abc2d92334c198e4" end end From fbb9e45803defd4d6006a1746d14ff47fd187e83 Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Mon, 23 Mar 2026 15:50:12 +0800 Subject: [PATCH 09/12] Add PR title and body to wingetcreate submission command --- .github/workflows/update-winget-manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-winget-manifest.yml b/.github/workflows/update-winget-manifest.yml index 0004f0f..8f2c019 100644 --- a/.github/workflows/update-winget-manifest.yml +++ b/.github/workflows/update-winget-manifest.yml @@ -86,4 +86,4 @@ jobs: exit 1 } $manifestPath = Split-Path $installerManifest - .\wingetcreate.exe submit $manifestPath + .\wingetcreate.exe submit $manifestPath --prtitle "Update GitHub.Copilot.modernization.agent to $version" --prbody "cc @qianwens @showpune @shizhMSFT" From 4d631f06b817a4ef6bf1c79affbd946b9e71b956 Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Mon, 23 Mar 2026 16:00:15 +0800 Subject: [PATCH 10/12] Enhance wingetcreate submission workflow to extract and log PR URL, and create a tracking issue upon submission --- .github/workflows/update-winget-manifest.yml | 32 +++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-winget-manifest.yml b/.github/workflows/update-winget-manifest.yml index 8f2c019..1baf805 100644 --- a/.github/workflows/update-winget-manifest.yml +++ b/.github/workflows/update-winget-manifest.yml @@ -44,6 +44,7 @@ jobs: echo "Version: $VERSION (tag: $TAG)" - name: Submit package using wingetcreate + id: submit shell: pwsh run: | $packageId = "GitHub.Copilot.modernization.agent" @@ -86,4 +87,33 @@ jobs: exit 1 } $manifestPath = Split-Path $installerManifest - .\wingetcreate.exe submit $manifestPath --prtitle "Update GitHub.Copilot.modernization.agent to $version" --prbody "cc @qianwens @showpune @shizhMSFT" + $output = .\wingetcreate.exe submit $manifestPath --prtitle "Update GitHub.Copilot.modernization.agent to $version" 2>&1 + Write-Output $output + + # Extract PR URL from output + $prUrl = "" + if ($output -match 'https://github\.com/microsoft/winget-pkgs/pull/\d+') { + $prUrl = $matches[0] + Write-Output "PR URL: $prUrl" + echo "pr_url=$prUrl" >> $env:GITHUB_OUTPUT + } else { + Write-Warning "Could not extract PR URL from output" + echo "pr_url=" >> $env:GITHUB_OUTPUT + } + + - name: Create tracking issue + uses: actions/github-script@v7 + with: + script: | + const prUrl = '${{ steps.submit.outputs.pr_url }}'; + const body = prUrl + ? `A PR has been submitted to microsoft/winget-pkgs for version ${{ steps.version.outputs.version }}.\n\nPR: ${prUrl}` + : `A PR has been submitted to microsoft/winget-pkgs for version ${{ steps.version.outputs.version }}.\n\nCheck https://github.com/microsoft/winget-pkgs/pulls for status.`; + + await github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: `WinGet PR submitted for v${{ steps.version.outputs.version }}`, + body: body, + assignees: ['qianwens', 'shizhMSFT', 'galiacheng'] + }); From bbe177d0e3d9e8dcc9b0efe1d0e8bed7f0f59fb4 Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Mon, 23 Mar 2026 16:01:32 +0800 Subject: [PATCH 11/12] Add issue creation step for Homebrew validation failures with detailed context --- .github/workflows/validate-homebrew.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/validate-homebrew.yml b/.github/workflows/validate-homebrew.yml index 8eb329a..64be70b 100644 --- a/.github/workflows/validate-homebrew.yml +++ b/.github/workflows/validate-homebrew.yml @@ -41,6 +41,7 @@ jobs: echo "Expected version: $version" - name: Verify installation + id: verify run: | output=$(modernize --version) echo "Version output: $output" @@ -50,3 +51,17 @@ jobs: echo "::error::Version mismatch. Expected '${{ steps.formula.outputs.version }}' in output but got: $output" exit 1 fi + + - name: Create issue on failure + if: failure() + uses: actions/github-script@v7 + with: + script: | + await github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: `Homebrew validation failed on ${{ matrix.name }}`, + body: `Homebrew installation validation failed for **${{ matrix.name }}**.\n\n**PR:** #${{ github.event.pull_request.number }}\n**Expected version:** ${{ steps.formula.outputs.version }}\n**Workflow run:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n\nPlease investigate the failure.`, + labels: ['homebrew', 'validation-failure'], + assignees: ['galiacheng'] + }); From 4ec6fc45b0f94540d82f3f5173f67b8608c6177d Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Mon, 23 Mar 2026 16:04:29 +0800 Subject: [PATCH 12/12] Add write permissions for issues in workflow files --- .github/workflows/update-winget-manifest.yml | 1 + .github/workflows/validate-homebrew.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/update-winget-manifest.yml b/.github/workflows/update-winget-manifest.yml index 1baf805..e22feac 100644 --- a/.github/workflows/update-winget-manifest.yml +++ b/.github/workflows/update-winget-manifest.yml @@ -20,6 +20,7 @@ jobs: permissions: contents: read pull-requests: write + issues: write runs-on: windows-latest diff --git a/.github/workflows/validate-homebrew.yml b/.github/workflows/validate-homebrew.yml index 64be70b..0df3410 100644 --- a/.github/workflows/validate-homebrew.yml +++ b/.github/workflows/validate-homebrew.yml @@ -7,6 +7,11 @@ on: jobs: validate-homebrew: if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Update Homebrew formula') + + permissions: + contents: read + issues: write + strategy: fail-fast: false matrix: