fix: permission change updates from webhook

This commit is contained in:
Andras Bacsai
2024-02-20 20:17:04 +01:00
parent f7ebc8a88c
commit 1ca0464957
4 changed files with 45 additions and 18 deletions

View File

@@ -86,3 +86,8 @@ function get_installation_path(GithubApp $source)
$installation_path = $github->html_url === 'https://github.com' ? 'apps' : 'github-apps';
return "$github->html_url/$installation_path/$name/installations/new";
}
function get_permissions_path(GithubApp $source) {
$github = GithubApp::where('uuid', $source->uuid)->first();
$name = Str::of(Str::kebab($github->name));
return "$github->html_url/settings/apps/$name/permissions";
}