Skip to content

Instantly share code, notes, and snippets.

@shinayser
Last active April 1, 2023 21:17
Show Gist options
  • Save shinayser/f9e9bb54bc08fe544e722565d57c5a7f to your computer and use it in GitHub Desktop.
Save shinayser/f9e9bb54bc08fe544e722565d57c5a7f to your computer and use it in GitHub Desktop.
Fetches all flutter hotfixes on stable branch
function Get-FlutterHotFixes([int]$Amount = 2) {
$url = "https://raw.githubusercontent.com/wiki/flutter/flutter/Hotfixes-to-the-Stable-Channel.md"
$regex = "###\s*\[?(?<Version>\d+.\d+.\d+)\]?(?<Url>.*)\s(?<Changes>[\s\S]+?)(?=#+)"
Invoke-RestMethod $url | Select-String -Pattern $regex -AllMatches | ForEach-Object {
$_.Matches | ForEach-Object { [pscustomobject]@{
Version = $_.Groups[1].Value
Url = $_.Groups[2].Value
Changes = $_.Groups[3].Value
}
}
} | Select-Object -First $Amount | Format-List
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment