Skip to main content

A code review bot for github pull requests

Project description

https://travis-ci.org/appfolio/farcy.svg?branch=master https://coveralls.io/repos/appfolio/farcy/badge.svg?branch=master

Definition:

a form of glanders chiefly affecting the skin and superficial lymphatic vessels of horses and mules.

While horses and mules function with farcy, such animals would likely prefer not to have them, and they are an eyesore to those viewing such animals. Unreviewed source code is analogous to farcy for equines, where the resulting execution of the source code will likely work as intended, but may be an eyesore to those working with the source. Farcy attempts to instruct authors of pull requests to remove eyesores they’ve added by commenting on changes introduced in pull requests.

Installation and execution

Farcy is easiest to install using pip:

$ pip install farcy

Farcy is run by specifying a github repository owner (or organization), the repository name, and an optional log level:

$ farcy --level INFO appfolio farcy

Configuration

Farcy allows to be configured using configuration files. Existence of a configuration file is optional and values can be overwritten by commandline arguments. On boot, Farcy will look for a configuration file at ~/.config/farcy/farcy.conf.

The configuration file can contain a DEFAULT section and a section per repository with specific settings. The DEFAULT section can take an optional repsitory key.

[DEFAULT]
repository:appfolio/farcy
log_level: INFO

[appfolio/farcy]
debug: true
exclude_paths: npm_modules, vendor, db
limit_users: balloob, bboe
pr_issue_report_limit: 32

[appfolio/gemsurance]
pr_issue_report_limit: 10
log_level: WARNING

Configuration files for the various linters can be placed in ~/.config/farcy/handler_NAME.conf. Replace NAME with the name of the handler.

Optional external pacakges needed for various file types

Python: farcy will take advantage of two tools for python files: flake8 and pep257. These can be installed alongside farcy via:

$ pip install farcy[python]

Ruby: In order to provide code review of ruby files, rubycop is required. Install via:

$ gem install rubocop

JavaScript: jsxhint is used to provide code review for JavaScript and JSX files. Install via:

$ npm install -g jsxhint

Docker

Farcy is available as a Docker image with all the handlers installed and ready to be used.

To get started, create a config folder with a configuration file farcy.conf that points at your repository.

[DEFAULT]
repository: appfolio/farcy

After that, run the Docker container in interactive mode to setup your GitHub credentials. This will create the file github_auth in your configuration folder. This file can be reused if you plan on creating multiple containers.

$ docker run -t -i -v /path/to/local/farcy/config:/config appfolio/farcy

After the initial setup, Farcy is ready to go and you can run the Docker container in daemon mode.

$ docker run -d --name="farcy" -v /path/to/local/farcy/config:/config appfolio/farcy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

farcy-1.0rc1.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

farcy-1.0rc1-py2.py3-none-any.whl (19.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file farcy-1.0rc1.tar.gz.

File metadata

  • Download URL: farcy-1.0rc1.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for farcy-1.0rc1.tar.gz
Algorithm Hash digest
SHA256 b5aadfb39dec9f89cc3d0548146011fc3fc228535756e79f8fc41e1638f36a45
MD5 86abcade9fc44404a8c906b607cdf51f
BLAKE2b-256 285d737679dfdc411c1f3e1a559e93f2834954152f97845d113bcab128e82f10

See more details on using hashes here.

File details

Details for the file farcy-1.0rc1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for farcy-1.0rc1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 77daf667b3d9176786c055615a8ea9cfaffe2e8189b22eb86b467dbc25983dd7
MD5 89d6cffd8679c8b416ce4cc6dacb79ae
BLAKE2b-256 736cc8f527bf5abb680ae99dc89b6106e4e4d9ca371333f9a251cc625a3c88f9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page