Add files via upload
This commit is contained in:
parent
6cffe84ec0
commit
9f4dbdddc4
|
@ -3,7 +3,7 @@
|
|||
# get the json from the repo api and assign it to the txt file
|
||||
|
||||
# This grads the json file from the API
|
||||
curl -u <insert GitHub PAT token> https://api.github.com/repos/maertend/opstest > outputtest.txt
|
||||
curl -u <insert GitHub PAT token> <insert GitHub repo URL> > outputtest.txt
|
||||
|
||||
# Reformats the json block to proper json (removes the newlines)
|
||||
string=$(cat temp.txt)
|
||||
|
@ -17,4 +17,4 @@ string2=${string/$find/$replace}
|
|||
echo $string2 > output.txt
|
||||
|
||||
# Post the updated JSON data to the repo
|
||||
curl -u <insert GitHub PAT token> https://api.github.com/repos/maertend/opstest --data @output.txt
|
||||
curl -u <insert GitHub PAT token> <insert GitHub repo URL> --data @output.txt
|
|
@ -14,7 +14,7 @@ $headers = @{ Authorization = $basicAuthValue }
|
|||
# Changing the status of a Private GitHub repository to Public
|
||||
|
||||
# URL to PowerShell Github Repo
|
||||
$PowerShellGithubUri = 'https://api.github.com/repos/maertend/opstest'
|
||||
$PowerShellGithubUri = '<insert GitHub repo URL>'
|
||||
|
||||
# Get the blob from the Github API as a PS object
|
||||
$JsonBlock = Invoke-RestMethod -Uri $PowerShellGithubUri -Headers $headers
|
||||
|
|
Loading…
Reference in a new issue