Skip to content

Instantly share code, notes, and snippets.

@matijagrcic
Created April 8, 2014 09:38
Show Gist options
  • Save matijagrcic/10104705 to your computer and use it in GitHub Desktop.
Save matijagrcic/10104705 to your computer and use it in GitHub Desktop.
Get open issues for specific project using Powershell and Gitlab
$url = 'http://gitlab.yoursite.com/api/v3/projects/:id/issues?private_token=XXXXX'
(Invoke-RestMethod $url) | Select-Object id, title, state, description | Format-Table –AutoSize
$url = 'http://gitlab.yoursite.com/api/v3/projects/:id/issues?private_token=XXXXX'
(Invoke-RestMethod $url) | Select-Object id, title, state, description | Sort-Object state | Format-Table –AutoSize
$url = 'http://gitlab.yoursite.com/api/v3/projects/:id/issues?private_token=XXXXX'
(Invoke-RestMethod $url) | Select-Object id, title, state, description | Where-Object {$_.state -eq 'closed'} | Format-Table –AutoSize
$url = 'http://gitlab.yoursite.com/api/v3/projects/:id/issues?private_token=XXXXX'
(Invoke-RestMethod $url) | Select-Object id, title, state, description | ConvertTo-HTML | Out-File C:\Issues.htm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment