Skip to content

Instantly share code, notes, and snippets.

@joshjohanning
Created March 1, 2022 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshjohanning/4b5b317f6839f60efb558a95ff2594f2 to your computer and use it in GitHub Desktop.
Save joshjohanning/4b5b317f6839f60efb558a95ff2594f2 to your computer and use it in GitHub Desktop.
generate-release-notes
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Accept", "application/vnd.github.v3+json")
$headers.Add("Authorization", "Bearer <add your PAT here>")
$headers.Add("Content-Type", "application/json")
$body = "{ `n `"tag_name`": `"newest`",`n `"previous_tag_name`": `"newer`"`n}"
$response = Invoke-RestMethod 'https://api.github.com/repos/services-octoshift-demo/Test-Octoshift-2/releases/generate-notes' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment