Get support for vincentchalamon/dashboard
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
vincentchalamon/dashboard
Dashboard
This project provides a dashboard to follow your GitHub repositories workflows.
Install
Requirements
- PHP >= 8.1
- GitHub Personal Access Token
- Symfony (for local usage)
Install Locally
git clone git@github.com:vincentchalamon/dashboard.git dashboard
cd dashboard
symfony composer install
symfony composer dump-env prod
symfony server:start
Configuration
Configure a
GitHub Personal Access Token on the
GITHUB_API_TOKEN
environment variable.
Create the repositories.yaml
file at the root of your project, as following:
repositories:
Default:
# Repository url without options
- https://github.com/GregoireHebert/docusign-bundle/
# Grouped repositories
API Platform:
# Repository name (default server: https://github.com)
api-platform/demo:
# Follow this branch instead of the default one
branch: develop
# Follow these workflows only
workflows:
- foo
- bar
Usage
Cache
The repositories configuration is stored in the cache.repository
cache pool. To clear it, fun the following command:
bin/console cache:pool:clear cache.repository
You can then warm it up:
bin/console cache:warmup
Add your own cache
To prevent to reach the X-Rate-Limit
on GitHub API, a cache has been set on the GitHub client, with 1 week TTL.
To add your own cache on your own client, configure the cache on Symfony and add a CacheClearer class:
# config/packages/cache.yaml
framework:
cache:
# ...
pools:
# ...
cache.foo:
adapter: cache.adapter.filesystem
default_lifetime: '1 week'
// src/Cache/FooCacheClearer.php
declare(strict_types=1);
namespace App\Cache;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface;
use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer;
final class FooCacheClearer implements CacheClearerInterface
{
public function __construct(
#[Autowire('@cache.global_clearer')] private readonly Psr6CacheClearer $poolClearer
) {
}
/**
* {@inheritdoc}
*/
public function clear(string $cacheDir): void
{
$this->poolClearer->clearPool('cache.foo');
}
}
Connect to a Remote Server
By default, only GitHub is supported. But you can easily connect to a remote server (e.g.: GitLab):
// src/Server/FooServer.php
declare(strict_types=1);
namespace App\Server;
use App\Metadata\RepositoryMetadataInterface;
use App\Model\Workflow;
use Psr\Log\LoggerInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
final class FooServer implements ServerInterface
{
public function __construct(private readonly HttpClientInterface $client, private readonly LoggerInterface $logger)
{
}
public function getDefaultBranch(RepositoryMetadataInterface $repository): string
{
// Call remote server API and return the repository default branch
}
public function getWorkflows(RepositoryMetadataInterface $repository): iterable
{
// Call remote server API and yield a Workflow object for each repository workflow
}
public function getStars(RepositoryMetadataInterface $repository): int
{
// Call remote server API and return the repository stars number
}
}
Note: to prevent to reach any
X-Rate-Limit
, you should consider adding your own cache.
Credits
Created by Vincent CHALAMON.
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2