Skip to content

Instantly share code, notes, and snippets.

@atymic
Created March 1, 2020 07:49
Show Gist options
  • Save atymic/e2856101b3c07bb9db83955a5177ad6c to your computer and use it in GitHub Desktop.
Save atymic/e2856101b3c07bb9db83955a5177ad6c to your computer and use it in GitHub Desktop.
Generate list of Laravel Notification Channels repos as MD tasks
<?php
$ignoreRepos = [
'laravel-notification-channels.github.io',
'channels',
'website',
];
$opts = [
'http' => [
'method' => 'GET',
'header' => 'User-Agent: Why-U-Require-Dis-Fam',
],
];
$repos = file_get_contents('https://api.github.com/orgs/laravel-notification-channels/repos?per_page=1000', false, stream_context_create($opts));
$out = [];
foreach (json_decode($repos, true) as $repo) {
if (in_array($repo['name'], $ignoreRepos, true)) {
continue;
}
$out[] = sprintf('- [ ] [%s](%s)', $repo['name'], $repo['html_url']);
}
sort($out);
echo implode("\n", $out);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment