Skip to content

Adds support for write calls with defined outputs. #51

Adds support for write calls with defined outputs.

Adds support for write calls with defined outputs. #51

Workflow file for this run

name: stylebot
on:
push:
branches:
- main
concurrency:
group: "stylebot"
cancel-in-progress: true
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
fix:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.STYLEBOT_GITHUB_APP_ID }}
private-key: ${{ secrets.STYLEBOT_GITHUB_APP_KEY }}
- uses: actions/checkout@master
- id: nodeversion
run: echo "::set-output name=version::$(grep nodejs .tool-versions | sed -e 's/[^[:space:]]*[[:space:]]*//')"
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.nodeversion.outputs.version }}
cache: yarn
- run: yarn install --immutable
# Run fixes, save stdout.
- run: |
echo 'ESLINT_RESULTS<<EOF' >> ${GITHUB_ENV}
yarn fix:eslint || true >> ${GITHUB_ENV}
echo 'EOF' >> ${GITHUB_ENV}
- run: |
echo 'PRETTIER_RESULTS<<EOF' >> ${GITHUB_ENV}
yarn fix:prettier >> ${GITHUB_ENV}
echo 'EOF' >> ${GITHUB_ENV}
# Make PR from local changes.
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: "[stylebot] Fixes for code style"
branch: stylebot/patch
title: "[stylebot] Fixes for code style"
body: |
Stylebot detected automatically fix-able code style issues.
`yarn fix:eslint`:
```
${{ env.ESLINT_RESULTS }}
```
`yarn fix:prettier`:
```
${{ env.PRETTIER_RESULTS }}
```