Continuous Shifts Automate Shift to run continuously on your projects.


Introducing Shift

Get started with Shift in three simple steps.

Shift like a Pro

Tricks for working through your Shift quickly.

Maintaining Shiftability

Tips on how to keep your project upgradable.

Dealing with Dependencies

How to resolve composer package incompatibilities.

Continuous Shifts

Automate Shift to run continuously on your projects.

Configure Shift

Configure Shifts behavior by adding a .shiftrc file.


Transcript

Shift's focus has always been automation. But with the new Shifty Plan you can automate this automation.

Now you have the ability to run Shifts on demand or set them up to run against your pull requests.

Both allow you to make Shift part of your continuous integration process so you can ensure you're writing consistent, modern, and maintainable code.

First let’s take a look at running Shifts on-demand. You can do this by sending a simple HTTP POST request.

This request takes a few pieces of data.

First your API token, which was sent to you when you subscribed to your Shifty Plan.

Next the code for which Shift to run. This can be the Laravel Linter, the Laravel Fixer, Dependency Upgrader, or PSR-2 Shift.

Finally you send a Shift connection string. This is a colon delimited string combining the Git service name, repository, and branch you want to run your Shift against.

So, for example, if I wanted to Shift the master branch of the Laravel Shift project on GitHub, I would set this to: github:jasonmccreary/laravelshift.com:master

Upon making a successful request, your Shift will be placed on the priority queue and the response will contain your Shift number.

You can add this POST request to a cron job to run periodically or as part of your build process.

The other bit of automation with your Shifty Plan is webhooks.

All of the popular Git services allow you to setup a webhook. These are triggered when certain repository events occur. The most common event being a Pull Request.

When triggered your Git service will make a request to Shift with the necessary information to run a specialized version of the Laravel Fixer.

This custom and exclusive Shift will review changed within the Pull Request and apply any fixes from the Laravel Fixer.

If there are any changes it will commit them to the Pull Request and leave comments for additional changes you may wish to review manually.

It’s important to note that all of the Shifts above respect the .shiftrc within your project. This allows you even further customization for how and which automations are performed.

This combination allows you to perform powerful automations with your Shifty Plan.