Migrating to GitHub Actions

Uninstall the GitHub App #

  1. Navigate to Settings > Applications > Installed GitHub Apps (for a user) or Settings > GitHub Apps > Installed GitHub Apps (for an organization)
  2. Click Configure on the Restyled.io App
  3. Click Uninstall

For more details, see here .

Add a Restyled Workflow #

Commit the following file in your repositories:

# .github/workflows/restyled.yml

name: Restyled

on:
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  restyled:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.ref }}

      - uses: restyled-io/actions/setup@v4
      - id: restyler
        uses: restyled-io/actions/run@v4
        with:
          fail-on-differences: true

      - if: |
          !cancelled() &&
          steps.restyler.outputs.success == 'true' &&
          github.event.pull_request.head.repo.full_name == github.repository          
        uses: peter-evans/create-pull-request@v6
        with:
          base: ${{ steps.restyler.outputs.restyled-base }}
          branch: ${{ steps.restyler.outputs.restyled-head }}
          title: ${{ steps.restyler.outputs.restyled-title }}
          body: ${{ steps.restyler.outputs.restyled-body }}
          labels: "restyled"
          reviewers: ${{ github.event.pull_request.user.login }}
          delete-branch: true

For more details, see here .

Differences #

Assuming you use the example workflow above, in an attempt to keep behavior as close to the original Restyled jobs as possible, you will find the following differences:

Status #

Users used to see a restyled PR status, with our avatar. The details link would go to the Restyled Pull Request (or the Job if there is none):

Restyled App status

Now, the status will be the same as any other Workflow, with the details link taking you to that workflow.

Restyled workflow status

Restyled workflow job

NOTE: opening the Restyled PR still puts an event into the stream of your original PR, which is the easiest way to navigate to it:

Restyled PR mention in original PR events

Author #

Restyled PRs used to be opened by the restyled-io app user:

PR header as created by restyled-io

They’re now opened by the github-actions bot:

PR header as created by github-actions

NOTE: The author of the PR is determined by the GITHUB_TOKEN in the create-pull-request step.

Patch Command #

Users used to see a curl <url> | git am command in the Job log, and they could follow that URL to see the full patch as its own web page:

Restyled App curl-git-am

Now, they will see a base64 | git am << <heredoc> command and can optionally expand the full patch directly in logs:

Restyled workflow base64-git-am