GithubHelp home page GithubHelp logo

prestashop / prestonbot Goto Github PK

View Code? Open in Web Editor NEW
22.0 27.0 20.0 1.52 MB

Preston, the PrestaShop contributor's best friend! :sparkles:

License: GNU General Public License v3.0

PHP 95.81% CSS 0.88% JavaScript 1.48% Makefile 0.27% Shell 0.26% Dockerfile 0.35% Twig 0.95%
bot assistant github-bot tool hacktoberfest

prestonbot's Introduction

PrestonBot

Warning

This project is now inactive. Prestonbot has been replaced in May 2024 by Kanbanbot a more modern implementation

This application is based on Symfony CarsonBot and aims to help PrestaShop maintainers and contributors.

Preston, the PrestaShop contributor best friend

Classic installation

First of all you have to configure your GitHub repository and have a GitHub token.

composer install // and complete the interactive fields asked

Docker installation

First, setup the docker-compose.yml file with a valid GitHub token and a valid Secure token (can be empty).

make start

The Home page is now available at "http://localhost:81/".

You need also to create your own GitHub personal token and export it:

export GH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
export GH_SECURED_TOKEN=YYYYYYYYYYYYYYYYYYYYYYYYYYYY

How to run the test suite ?

./vendor/bin/simple-phpunit
# or (using docker)
make test

To launch unit tests, you only need to setup your own Github token (GH_TOKEN).

Our standards ?

Yeah, mostly the Symfony ones:

./vendor/bin/php-cs-fixer fix # we use the Symfony level + short array notation filter

What is Preston capable of doing?

  • Comment on a pull request to help a contributor fix his work;
  • Extract data from the pull request and look for some terms;
  • Manage labels;
  • Validate a pull request description;
  • Welcome every new contributor;
  • Labelize a PR regarding information in description
  • Labelize a PR regarding files updated
  • Add labels according to the branch

prestonbot's People

Contributors

aleeks avatar antoin-m avatar atomiix avatar dependabot[bot] avatar eternoendless avatar fulldecent avatar guilhemn avatar jmorinps avatar johnnypeck avatar jolelievre avatar julienbourdeau avatar matks avatar matthieu-rolland avatar mickaelandrieu avatar nicosomb avatar pierrerambaud avatar progi1984 avatar quetzacoalt91 avatar shudrum avatar thierrymarianne avatar weaverryan avatar webmozart avatar wouterj avatar xabbuh avatar xborderie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prestonbot's Issues

[Insight] Source code should not contain TODO comments - in web/css/bootstrap-prestashop-ui-kit.css, line 3

in web/css/bootstrap-prestashop-ui-kit.css, line 3

TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

@charset "UTF-8";
/* not used */
/* TODO change padding */
@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700,800");
@import url(jquery.pstagger.css);
@font-face {
  font-family: 'Material Icons';
  font-style: normal;

Posted from SensioLabsInsight

[Insight] Error silenced by the at sign (@) - in src/…/Security/SignatureValidator.php, line 49

in src/AppBundle/Security/SignatureValidator.php, line 49

Adding "@" before hash_hmac($algorithm, $payload, $secret) prevents warning and errors during this function execution from being displayed.
If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

        if (empty($algorithm) || empty($hash)) {
            return false;
        }

        $payloadHash = @hash_hmac($algorithm, $payload, $secret);

        return $hash === $payloadHash;
    }
}

Posted from SensioLabsInsight

Add stalled automatic notifications

Regarding the mainteners guide, a PR need to be closed after 30 days of non-activity/answer.

I propre to adapt PrestonBot to make it automatic and add a notification in +15 days before the close in order to ping again the contrbutor.

Something as the CarsonBot do with the stalled tag.

[BOGOSS-40] PrestonBot should be allow to request changes on Pull request - first part

This issue has been migrated from the Forge. Read the original ticket here.

  • Reporter: mAndrieu
  • Created at: Thu, 15 Sep 2016 16:53:57 +0200

Basically, since GitHub have introduced a Review system (https://help.github.com/articles/about-pull-request-reviews/), PrestonBot should request changes on Pull request template when its invalid.

This will enforce the quality of future changelogs, the quality of contribution and once it's done this need no more human efforts.

Of course, when the changes have been made, PrestonBot should approve the pull request.

Preston should be able to remove labels on update

For example :

  1. I open a PR with a commit that modifies classic
  2. Preston adds "Report on StarterTheme" label
  3. I update the PR -> it doesn't change classic anymore
  4. [IMPROVMENT] Preston should remove the "Report on StarterTheme" label

As suggested here : #48

[Improvement] Security - increase account security with 2fa

In order to be able to work, prestonbot has write access to prestashop repositories. In order to make sure this cannot be used by an attacker we need to increase the account security. Enabling 2FA for prestonbot could be a good solution but would this impact the behavior of prestonbot? What about the API calls it performs, how do they work with 2FA?

Tests cannot be launched

vendor/bin/simple-phpunit

Fatal error: Uncaught RuntimeException: Could not find https://github.com/sebastianbergmann/phpunit/archive/5.7.zip in /Users/mFerment/www/prestashop/prestonbot/vendor/symfony/phpunit-bridge/bin/simple-phpunit:70
Stack trace:
#0 {main}
  thrown in /Users/mFerment/www/prestashop/prestonbot/vendor/symfony/phpunit-bridge/bin/simple-phpunit on line 70

Travis pipeline is broken

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 96 installs, 0 updates, 0 removals
  - Installing ocramius/package-versions (1.3.0): Downloading (100%)
  - Installing doctrine/cache (v1.7.1): Downloading (100%)
  - Installing doctrine/collections (v1.5.0): Downloading (100%)
  - Installing doctrine/inflector (v1.3.0): Downloading (100%)
  - Installing doctrine/lexer (v1.0.1): Downloading (100%)
  - Installing egulias/email-validator (2.1.4): Downloading (100%)
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
  - Installing psr/http-message (1.0.1): Downloading (100%)
  - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)
  - Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%)
  - Installing symfony/yaml (v3.4.11): Downloading (100%)
  - Installing incenteev/composer-parameter-handler (v2.1.3): Downloading (100%)
  - Installing psr/cache (1.0.1): Downloading (100%)
  - Installing php-http/promise (v1.0.0): Downloading (100%)
  - Installing php-http/httplug (v1.1.0): Downloading (100%)
  - Installing php-http/discovery (1.4.0): Downloading (100%)
  - Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)
  - Installing php-http/guzzle6-adapter (v1.1.1): Downloading (100%)
  - Installing symfony/options-resolver (v3.4.11): Downloading (100%)
  - Installing php-http/message-factory (v1.0.2): Downloading (100%)
  - Installing clue/stream-filter (v1.4.0): Downloading (100%)
  - Installing php-http/message (1.6.0): Downloading (100%)
  - Installing php-http/client-common (1.7.0): Downloading (100%)
  - Installing php-http/cache-plugin (v1.5.0): Downloading (100%)
  - Installing knplabs/github-api (2.8.0): Downloading (100%)
  - Installing lp-digital/github-event-parser (v0.8.3): Downloading (100%)
  - Installing paragonie/random_compat (v2.0.15): Downloading (100%)
  - Installing psr/container (1.0.0): Downloading (100%)
  - Installing psr/simple-cache (1.0.1): Downloading (100%)
  - Installing symfony/process (v3.4.11): Downloading (100%)
  - Installing symfony/polyfill-php70 (v1.8.0): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.8.0): Downloading (100%)
  - Installing symfony/http-foundation (v3.4.11): Downloading (100%)
  - Installing symfony/event-dispatcher (v3.4.11): Downloading (100%)
  - Installing psr/log (1.0.2): Downloading (100%)
  - Installing symfony/debug (v3.4.11): Downloading (100%)
  - Installing symfony/http-kernel (v3.4.11): Downloading (100%)
  - Installing symfony/filesystem (v3.4.11): Downloading (100%)
  - Installing symfony/dependency-injection (v3.4.11): Downloading (100%)
  - Installing symfony/config (v3.4.11): Downloading (100%)
  - Installing symfony/class-loader (v3.4.11): Downloading (100%)
  - Installing symfony/console (v3.4.11): Downloading (100%)
  - Installing composer/ca-bundle (1.1.1): Downloading (100%)
  - Installing sensiolabs/security-checker (v4.1.8): Downloading (100%)
  - Installing sensio/distribution-bundle (v5.0.22): Downloading (100%)
  - Installing symfony/routing (v3.4.11): Downloading (100%)
  - Installing symfony/finder (v3.4.11): Downloading (100%)
  - Installing symfony/polyfill-apcu (v1.8.0): Downloading (100%)
  - Installing symfony/cache (v3.4.11): Downloading (100%)
  - Installing symfony/framework-bundle (v3.4.11): Downloading (100%)
  - Installing doctrine/annotations (v1.6.0): Downloading (100%)
  - Installing doctrine/common (v2.8.1): Downloading (100%)
  - Installing sensio/framework-extra-bundle (v3.0.29): Downloading (100%)
  - Installing symfony/asset (v3.4.11): Downloading (100%)
  - Installing symfony/var-dumper (v3.4.11): Downloading (100%)
  - Installing twig/twig (v2.4.8): Downloading (100%)
  - Installing symfony/twig-bridge (v3.4.11): Downloading (100%)
  - Installing symfony/debug-bundle (v3.4.11): Downloading (100%)
  - Installing symfony/lts (v3)
  - Installing monolog/monolog (1.23.0): Downloading (100%)
  - Installing symfony/monolog-bridge (v3.4.11): Downloading (100%)
  - Installing symfony/monolog-bundle (v3.3.0): Downloading (100%)
  - Installing symfony/polyfill-util (v1.8.0): Downloading (100%)
  - Installing symfony/polyfill-php56 (v1.8.0): Downloading (100%)
  - Installing symfony/inflector (v3.4.11): Downloading (100%)
  - Installing symfony/property-access (v3.4.11): Downloading (100%)
  - Installing symfony/security (v3.4.11): Downloading (100%)
  - Installing symfony/security-bundle (v3.4.11): Downloading (100%)
  - Installing swiftmailer/swiftmailer (v6.0.2): Downloading (100%)
  - Installing symfony/swiftmailer-bundle (v3.2.2): Downloading (100%)
  - Installing symfony/templating (v3.4.11): Downloading (100%)
  - Installing symfony/twig-bundle (v3.4.11): Downloading (100%)
  - Installing symfony/translation (v3.4.11): Downloading (100%)
  - Installing symfony/validator (v3.4.11): Downloading (100%)
  - Installing symfony/web-profiler-bundle (v3.4.11): Downloading (100%)
  - Installing symfony/stopwatch (v3.4.11): Downloading (100%)
  - Installing symfony/polyfill-php72 (v1.8.0): Downloading (100%)
  - Installing php-cs-fixer/diff (v1.3.0): Downloading (100%)
  - Installing composer/xdebug-handler (1.1.0): Downloading (100%)
  - Installing composer/semver (1.4.2): Downloading (100%)
  - Installing friendsofphp/php-cs-fixer (v2.12.1): Downloading (100%)
  - Installing nette/utils (v2.5.2): Downloading (100%)
  - Installing nette/finder (v2.4.2): Downloading (100%)
  - Installing nette/neon (v2.4.3): Downloading (100%)
  - Installing nette/php-generator (v3.0.4): Downloading (100%)
  - Installing phpstan/phpdoc-parser (0.3): Downloading (100%)
  - Installing nikic/php-parser (v4.0.2): Downloading (100%)
  - Installing nette/robot-loader (v3.0.4): Downloading (100%)
  - Installing nette/di (v2.4.13): Downloading (100%)
  - Installing nette/bootstrap (v2.4.6): Downloading (100%)
  - Installing jean85/pretty-package-versions (1.2): Downloading (100%)
  - Installing phpstan/phpstan (0.10.1): Downloading (100%)
  - Installing symfony/dom-crawler (v3.4.11): Downloading (100%)
  - Installing symfony/browser-kit (v3.4.11): Downloading (100%)
  - Installing symfony/phpunit-bridge (v3.4.11): Downloading (100%)
  - Installing symfony/web-server-bundle (v3.4.0): Downloading (100%)
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
php-http/discovery suggests installing puli/composer-plugin (Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details.)
php-http/message suggests installing slim/slim (Used with Slim Framework PSR-7 implementation)
php-http/message suggests installing zendframework/zend-diactoros (Used with Diactoros Factories)
php-http/client-common suggests installing php-http/logger-plugin (PSR-3 Logger plugin)
php-http/client-common suggests installing php-http/stopwatch-plugin (Symfony Stopwatch plugin)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
symfony/console suggests installing symfony/lock
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/framework-bundle suggests installing ext-apcu (For best performance of the system caches)
symfony/framework-bundle suggests installing symfony/form (For using forms)
symfony/framework-bundle suggests installing symfony/property-info (For using the property_info service)
symfony/framework-bundle suggests installing symfony/serializer (For using the serializer service)
symfony/framework-bundle suggests installing symfony/web-link (For using web links, features such as preloading, prefetching or prerendering)
sensio/framework-extra-bundle suggests installing symfony/expression-language
sensio/framework-extra-bundle suggests installing symfony/psr-http-message-bridge (To use the PSR-7 converters)
symfony/var-dumper suggests installing ext-symfony_debug
symfony/twig-bridge suggests installing symfony/expression-language (For using the ExpressionExtension)
symfony/twig-bridge suggests installing symfony/form (For using the FormExtension)
symfony/twig-bridge suggests installing symfony/web-link (For using the WebLinkExtension)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
symfony/security suggests installing symfony/expression-language (For using the expression voter)
symfony/security suggests installing symfony/form
symfony/security suggests installing symfony/ldap (For using the LDAP user and authentication providers)
symfony/security-bundle suggests installing symfony/security-acl (For using the ACL functionality of this bundle)
symfony/validator suggests installing symfony/expression-language (For using the Expression validator)
symfony/validator suggests installing symfony/intl
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-isidenticalstring (For IsIdenticalString constraint.)
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-xmlmatchesxsd (For XmlMatchesXsd constraint.)
nette/bootstrap suggests installing tracy/tracy (to use Configurator::enableTracy())
symfony/dom-crawler suggests installing symfony/css-selector
Package symfony/lts is abandoned, you should avoid using it. Use symfony/flex instead.
Generating autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Creating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
 // Clearing the cache for the dev environment with debug                       
 // true                                                                        
                                                                                
 [OK] Cache for the "dev" environment (debug=true) was successfully cleared.    
                                                                                
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets
 Trying to install assets as relative symbolic links.
                                                                                
 [OK] No assets were provided by any bundle.                                    
                                                                                
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
0.56s$ ./vendor/bin/simple-phpunit install
PHP Fatal error:  Uncaught RuntimeException: Could not find https://github.com/sebastianbergmann/phpunit/archive/6.5.zip in /home/travis/build/PrestaShop/prestonbot/vendor/symfony/phpunit-bridge/bin/simple-phpunit:70
Stack trace:
#0 {main}
  thrown in /home/travis/build/PrestaShop/prestonbot/vendor/symfony/phpunit-bridge/bin/simple-phpunit on line 70
Fatal error: Uncaught RuntimeException: Could not find https://github.com/sebastianbergmann/phpunit/archive/6.5.zip in /home/travis/build/PrestaShop/prestonbot/vendor/symfony/phpunit-bridge/bin/simple-phpunit:70
Stack trace:
#0 {main}
  thrown in /home/travis/build/PrestaShop/prestonbot/vendor/symfony/phpunit-bridge/bin/simple-phpunit on line 70
The command "./vendor/bin/simple-phpunit install" failed and exited with 255 during .

https://travis-ci.org/PrestaShop/prestonbot/jobs/518930628

This prevents any new PR to be validated by Travis.

And #78 will probably block PRs too

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.