Created
July 7, 2017 01:10
-
-
Save IlyaFinkelshteyn/def2394231afb7f06dcaeaceda1fb1ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#GitHub_Token is secure variable | |
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {$env:CONTEXT = "continuous-integration/appveyor/pr"} else {$env:CONTEXT = "continuous-integration/appveyor/branch"} | |
$headers = @{ | |
"Authorization" = "Bearer $env:GitHub_Token" | |
"Content-type" = "application/json" | |
} | |
$body = @{ | |
state="pending" | |
target_url="https://ci.appveyor.com/project/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/build/$env:APPVEYOR_BUILD_VERSION" | |
description="Waiting for AppVeyor build to complete" | |
context=$env:CONTEXT | |
} | |
$body = $body | ConvertTo-Json | |
Invoke-RestMethod -Uri "https://api.github.com/repos/$env:APPVEYOR_REPO_NAME/statuses/$env:APPVEYOR_REPO_COMMIT" -Headers $headers -Body $body -Method POST |
Wasapl
commented
Jul 19, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment