Table of Contents generated with DocToc
Ladle uses the Github API for authenticating users and interacting with repositories. These uses introduce some intricacies when running the application locally as described in the following sections.
The only form of authentication is through the Github API. This poses some challenges to running the application locally.
Running the application with the ENV MOCK_OMNIAUTH=1
ENV stubs out the Github authentication locally. See the config/initializers/mock_omni_auth.rb initializer for details.
You can test the application against a remote repository on Github using the following steps:
- Overwrite the
github_application
credentials in config/github.yml. - Start the server locally without mocking:
rails s
. - Create
User
andRepository
records per Observing Repositories. - Create stewards.yml files and pull requests in the remote repository.
You can test the handling of PRs using a local repository on the file system using Ladle::LocalRepositoryClient
:
- Setup a local repository with scenarios you would like to test.
- Create a
Ladle::LocalRepositoryClient
and run it throughLadle::PullRequestChangeCollector
. - See bin/local_test for an example.