The app fails to deploy a repo hook despite having permission because it's not got the permission with the upstream repo. This occurs when the admin sets repo_hook permission rather than just public_repo permission. There is an assumption repo_hook is uses with their own repo which may not be the case. The installer should also determine if the repo_hook permission is possible with the requested repo.
This function does not consider the repo which repo_hook will be tried with.
|
const canTokenRepoHook = async (token: string): Promise<boolean> => { |