Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GitHub plugin service #191

Merged
merged 3 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ config.cfg
*config.yaml
!tests/**/config.yaml
.phpunit.result.cache
.php-cs-fixer.cache
vendor/
composer.phar
php_errors.log
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
return (new Config())
->registerCustomFixers(new Fixers())
->setRiskyAllowed(true)
->setUsingCache(false)
->setRules([
'@PSR12' => true,
'@Symfony' => true,
Expand All @@ -43,6 +42,7 @@
'no_superfluous_phpdoc_tags' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'nullable_type_declaration_for_default_null_value' => true,
'operator_linebreak' => ['only_booleans' => true],
'ordered_class_elements' => true,
'ordered_imports' => true,
Expand Down
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,45 @@ The SW cli tools make use of the XDG directory standard. Following directories a
If you changed some of these directories via `XDG` environment variables, those directories are used instead

# Configuration
The configuration of the script is done in `~/.config/sw-cli-tools/config.yaml`. If the file does not exist on your system, it is created after the first usage of the script.
The configuration of the script is done in `~/.config/sw-cli-tools/config.yaml`.
If the file does not exist on your system, it is created after the first usage of the script.

## Repositories
In order to use commands like `plugin:zip:vcs` the tool needs to know where the source comes from.
For this repositories need to be defined in the `repositories` section of the configuration file.
For now the following repository types are supported:
- GitHub
- Stash
- BitBucket
- SimpleList
- GitLab

This is how an example config could look like:

```yml
repositories:
GitLab:
config:
endpoint: https://gitlab.shopware.com/api/v4/
repositories:
Services SW5:
cache: 86400
url: groups/92/projects?per_page=100&private_token=your-private-token
color: red
GitHub:
config:
endpoint: https://api.github.com/search/
repositories:
Plugins SW5:
cache: 86400
url: repositories?q=org:Shopware5+topic:shopware-plugin
color: blue
```

# Building sw.phar
For building the release package (`sw.phar`) [box](http://box-project.github.io/box2/) is used.
A new release is build automatically for every push on the master branch by Travis CI (See `bin/deploy.sh`).


# Coding standard
Coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).
Coding standard violations may be detected using php-cs-fixer:
Expand Down
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ext-curl": "*",
"dnoegel/php-xdg-base-dir": "~0.1",
"fakerphp/faker": "^1.21.0",
"guzzlehttp/guzzle": "^6.5.2",
"guzzlehttp/guzzle": "^7.7.0",
"laravel-zero/phar-updater": "^1.1",
"shopwarelabs/plugin-info": "0.1.0",
"symfony/config": "~5.4",
Expand All @@ -19,11 +19,14 @@
},
"require-dev": {
"ext-phar": "*",
"friendsofphp/php-cs-fixer": "^3.14.3",
"kubawerlos/php-cs-fixer-custom-fixers": "^v3.11.3",
"friendsofphp/php-cs-fixer": "^3.17.0",
"kubawerlos/php-cs-fixer-custom-fixers": "^v3.14.0",
"phpunit/phpunit": "^9.5",
"symfony/var-dumper": "~5.4"
},
"replace": {
"symfony/polyfill-php73": "*"
},
"scripts": {
"cs-check": "php-cs-fixer fix --dry-run -v",
"cs-fix": "php-cs-fixer fix -v",
Expand Down