A Gitea Storage filesystem for Flysystem.
This package contains a Flysystem adapter for Gitea. Under the hood, Gitea's API v1 is used.
This is a fork from the marvelous RoyVoetman/flysystem-gitlab-storage package which has been adapted to work with Gitea's API.
composer require infernalmedia/flysystem-gitea-storage
// Create a Gitea Client to talk with the API
$client = new Client('username', 'repository', 'branch', 'base-url', 'personal-access-token');
// Create the Adapter that implements Flysystems AdapterInterface
$adapter = new GiteaAdapter(
// Gitea API Client
$client,
// Optional path prefix
'path/prefix',
);
// The FilesystemOperator
$filesystem = new League\Flysystem\Filesystem($adapter);
// see http://flysystem.thephpleague.com/api/ for full list of available functionality
This is the username or the organization name under which repositories are stored.
Name of the repository.
This will be the URL where you host your gitea server (e.g. https://gitea.com)
Gitea supports server side API authentication with Personal Access tokens
Personal Access Token can be created from the Settings page of your user account.
Please see CHANGELOG for more information what has changed recently.
Contributions are welcome and will be fully credited. We accept contributions via Pull Requests on Github.
- PSR-2 Coding Standard - The easiest way to apply the conventions is to install PHP Code Sniffer.
- Document any change in behaviour - Make sure the
README.md
and any other relevant documentation are kept up-to-date. - Create feature branches - Don't ask us to pull from your master branch.
- One pull request per feature - If you want to do more than one thing, send multiple pull requests.
The MIT License (MIT). Please see License File for more information.