(?<releaseNote>\#\s(?<releaseDate>[\-0-9]+)\s-\s(?<version>(\d+)(\.(\d+))?(\.(\d+))?(([^0-9][^\s]+)))(?<releaseText>((?!\s# )[\s\S])*))
Where the form this matches is
# <random text> <version specifier>
<release note content
| # A little script to get all active PRS from a github repo. Filter by a label if you wish. | |
| # | |
| # | |
| # EXAMPLE USAGE | |
| # | |
| # ./interrogate_active_prs.ps1 -labelFilter Dev -gh_token <YOUR GITHUB PAT> -repoName release-testing -repoOwner scbedd | |
| # | |
| # or copy this script locally, set the default repo and owner, set and environment variable of name GH_TOKEN with your PAT, and | |
| # run it simply with a labelfilter if you want. | |
| param ( |
| Function Create-Virtual-Environment([String] $envName = "venv") { | |
| $cwd = Get-Location | |
| $relativePath = Join-Path -Path $cwd -ChildPath $envName | |
| $pathToDeactivate = Join-Path -Path $relativePath -ChildPath "Scripts/deactivate.bat" | |
| # if it already exists make certain to deactivate it | |
| if(Test-Path $pathToDeactivate -PathType Leaf) | |
| { | |
| & $pathToDeactivate |
| # A little script to get active PRs that affect a readme | |
| # | |
| # There are limitations here. Note that pulling the files list associated with a PR does have a maximum. I wouldn't trust this scripts | |
| # to properly assess PRs that have more than 300 files modified. | |
| # | |
| # To get a GITHUB Token: https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line | |
| # | |
| # EXAMPLE USAGE (from powershell) | |
| # | |
| # ./get_prs_with_readme.ps1 -labelFilter Dev -gh_token <YOUR GITHUB PAT> -repoName release-testing -repoOwner scbedd |
| # transition old style versioning strategy to new. inclusive of existing versions in both strategies | |
| param ( | |
| $AzCopy, | |
| $SASKey, | |
| $Language, | |
| $BlobName, | |
| $DocLocation, | |
| $AccountKey | |
| ) |
| # transition old style versioning strategy to new. inclusive of existing versions in both strategies | |
| param ( | |
| $AzCopy, | |
| $SASKey, | |
| $Language, | |
| $BlobName, | |
| $DocLocation, | |
| $AccountKey | |
| ) | |
| $AccountName = ($BlobName.Replace("https://", "") -Split "\.")[0] |
| # Example Usage: ./copy_readmes.ps1 -CodeRepo C:/repo/sdk-for-python -DocRepo C:/repo/azure-docs-sdk-python | |
| # Highly recommended that you use Powershell Core. | |
| # git reset --hard origin/smoke-test on the doc repo prior to running this | |
| param ( | |
| [String]$CodeRepo, | |
| [String]$DocRepo, | |
| [String]$TargetServices = "keyvault,storage" | |
| ) |
| import os | |
| import glob | |
| from subprocess import check_call, CalledProcessError | |
| import pdb | |
| import logging | |
| import sys | |
| import shutil | |
| import requests | |
| from io import StringIO | |
| import csv |
| $users = "<comma separated list of github users>" | |
| # notice that we substring(1). This is because if you grab the gh users from a codeowners file, there will be a leading @ | |
| # the substring rips it off. | |
| $filtered_users = $users.Split(",") | % {$_.Trim()} | ? { $_ } | % { $_.SubString(1) } | Select -Unique | |
| $not_added = @() | |
| $headers = @{ | |
| "Content-Type" = "application/json" | |
| "Authorization" = "token $($env:GH_TOKEN)" |