Each Shifty Plan provides access to the
/api/run endpoint. Using this endpoint you can trigger Shifts to run as part of your build, a weekly audit, or on-demand.
Currently the Shift API allows you to run the follow Shifts:
To run a Shift, send a
POST request to https://laravelshift.com/api/run with the following data:
api_tokenYour Shifty Plan API token
codeThe code of the Shift you wish to run. For example:
60for the Laravel 6.0 Shift
LLfor the Laravel Linter
LFfor the Laravel Fixer
DUfor the Dependency Updater
P2for the PSR-2
scsThe Git service, repository, and branch name as a colon (
:) delimited connection string. For example:
The following is an example API request using
curl to run the Laravel Fixer against the
master branch of the
jasonmccreary/confidentlaravel.com repository on GitHub. You may use this example by substituting the request data with your own API Key and values.
curl -X POST -H 'Accept: application/json' \ -d "api_token=1234567890" \ -d "code=60" \ -d "scs=github:jasonmccreary/gettinggit.com:master" \ https://laravelshift.com/api/run
You may also setup webhooks which can be triggered when certain repository events occur. Each Shifty Plan allows you to setup a webhook to run a customizable version of the Laravel Fixer anytime you open a Pull Request.
To do so, you may register a webhook for any repository included under your plan with the following details:
- Set the webhook URL to your Shifty Plan endpoint, for example:
- Ensure the payload is sent as
- Under Events, only check the Pull Request event (Merge Request for GitLab)