简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM