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
SONARCLOUD_ORGANIZATION = "" | |
SONARCLOUD_TOKEN = "" | |
def post_sonarcloud_setting(name, key, value): | |
response = requests.post( | |
"https://sonarcloud.io/api/settings/set", | |
data={ | |
"organization": SONARCLOUD_ORGANIZATION, | |
"component": name, | |
"key": key, | |
"value": value | |
}, | |
auth=(SONARCLOUD_TOKEN, "")) | |
response.raise_for_status() | |
post_sonarcloud_setting( | |
repository, | |
"sonar.pullrequest.vsts.token.secured", | |
"VSTS token here") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment