EZR
EZR

Reputation: 73

How to get the list of files from particular repo in github using PowerShell?

Something similar to this - How to get list of files from a specific GitHub repo(Link) in c# , but using PowerShell.

Upvotes: 0

Views: 1752

Answers (1)

postanote
postanote

Reputation: 16096

Microsoft already provides cmdlets for github use cases.

PowerShellForGitHub

https://github.com/Microsoft/PowerShellForGitHub

Even the link you post gave you an answer:

curl https://api.github.com/repos/crs2007/ActiveReport/contents/ActiveReport

curl is an alias in PowerShell

Get-Alias -Name curl
# Results
<#
 Get-Alias -Name curl

CommandType     Name                       Version    Source                                                                                              
-----------     ----                       -------    ------                                                                                              
Alias           curl -> Invoke-WebRequest 
#>

# Get specifics for a module, cmdlet, or function
(Get-Command -Name Invoke-WebRequest ).Parameters
(Get-Command -Name Invoke-WebRequest ).Parameters.Keys
Get-help -Name Invoke-WebRequest  -Examples
Get-help -Name Invoke-WebRequest  -Full
Get-help -Name Invoke-WebRequest  -Online

Upvotes: 3

Related Questions