Skip to content

Instantly share code, notes, and snippets.

@asears
Created October 5, 2020 10:23
Show Gist options
  • Select an option

  • Save asears/de9d385408a5e4db70aceb199390d240 to your computer and use it in GitHub Desktop.

Select an option

Save asears/de9d385408a5e4db70aceb199390d240 to your computer and use it in GitHub Desktop.
Get Github issues to markdown using hub
# Given a list of Github issues in a text file
# generate markdown details in a consolidated file
# generate markdown details in a file per issue
# generate an issue summary file
hub issue -s all --include-pulls -f "%I%n" | Out-File -FilePath issuelist.csv
ForEach ($issue in (Get-Content -Path issuelist.csv))
{
Write-Output $issue
hub issue show -f "%t%n%U%nState: %S%nCreated: %cD%nUpdated: %uD%nDetails: %b%n%n" ${issue} | Out-File -Append -FilePath issueexport.md
hub issue show -f "%t%n%U%nState: %S%nCreated: %cD%nUpdated: %uD%nDetails: %b%n%n" ${issue} | Out-File -Append -FilePath issue-${issue}.md
hub issue show -f "%t%n%U%n" ${issue} | Out-File -Append -FilePath issuesummary.md
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment