0

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

EZR
  • 63
  • 6
  • SO has rules, we are to follow: [Provide MRE](https://stackoverflow.com/help/minimal-reproducible-example) --- [How to ask](https://stackoverflow.com/help/how-to-ask) --- [Don't ask](https://stackoverflow.com/help/dont-ask) --- [Proper Topic](https://stackoverflow.com/help/on-topic) --- [Why not upload images of code/errors?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question). PowerShell is .Net based, and all of .Net is avaialbe to you. You can use C# in PS scripts. Just search for examples regarding that use case. – postanote Jan 25 '21 at 03:22
  • There are many Q&A's on SO regarding PowerShell and GitHub. Just use the serach box above: https://stackoverflow.com/search?q=powershell+github or the web in general. – postanote Jan 25 '21 at 03:24

1 Answers1

3

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
postanote
  • 15,138
  • 2
  • 14
  • 25