API to enable AutoScan for GitHub repo

Following requests directly from the site, I found out how to enable AutoScan for Github Repository automatically.

So, sharing script to make it publicly available and I hope it will help someone:

curl --include \
    --request POST \
    --header "Content-Type: application/x-www-form-urlencoded" \
    -u ${SONAR_TOKEN}: \
    --data-binary "installationKeys=${GITHUB_ORG}%2F${REPO_NAME}%7C${REPO_ID}&organization=${SONAR_ORG}" \
   "https://sonarcloud.io/api/alm_integration/provision_projects"
curl --include \
    -u ${SONAR_TOKEN}: \
   "https://sonarcloud.io/api/autoscan/eligibility?autoEnable=true&projectKey=${GITHUB_ORG}_${REPO_NAME}"

Thanks a lot.