Make the script compatible with new github changes