-
Notifications
You must be signed in to change notification settings - Fork 21
Applying Fixes Locally
When Restyled runs, it captures the style fixing commits it makes by running git format-patch <base>
. This output is made available by appending /patch
to the Job URL. This means that running,
curl <job-url>/patch | git am
Will apply Restyled's fixes directly to your local checkout.
This process even preserves all metadata about the commits: timestamp, message, and Restyled as author.
This features enables the following workflow:
- A contributor opens a PR
- The Restyled PR status is Red, "differences found"
- The link to the Job shows the
curl | git am
command - The contributors runs this command and pushes
- The Restyled PR status is now Green
This workflow is available in all scenarios, though it's particularly useful when Restyled is unable to make sibling PRs. Anyone who finds this easier should take advantage! You can even configure Restyled to never open PRs, if you prefer.
The patch is retained as part of the Job log (which is literally the stdout
of the restyler
CLI). We retain these logs for 30 days, after which the log and patch will be pruned.
The patch may also be literally empty, if there were no style fixes to make.
If you believe this is an error (neither of the above are true), please reach out to [email protected].
Removed