Skip to content

fix(skymp5-server): force template chain recalculation in case of inc… #3678

fix(skymp5-server): force template chain recalculation in case of inc…

fix(skymp5-server): force template chain recalculation in case of inc… #3678

Workflow file for this run

name: Reformat
on:
push:
pull_request:
branches:
- '**'
jobs:
reformat:
name: Reformat
runs-on: ubuntu-latest
if: ${{ contains(github.event.commits[0].message, '[reformat]') || contains(github.event.pull_request.title, '[reformat]') || contains(github.event.pull_request.body, '[reformat]') }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Format with clang-format
uses: DoozyX/[email protected]
with:
source: '.'
exclude: './skyrim-platform/src/third_party ./skymp5-server/cpp/third_party/MakeID.h'
extensions: 'h,cpp,hpp'
clangFormatVersion: 15
inplace: True
# Uncomment these steps if you need to install yarn packages and format with prettier
# - name: Install yarn packages
# uses: borales/actions-yarn@v4
# with:
# cmd: --cwd=./misc/prettier install
# - name: Format with prettier
# uses: borales/actions-yarn@v4
# with:
# cmd: --cwd=./misc/prettier prettier-format
# TODO: get this to work
# - name: Create Comment with Suggested Changes
# uses: actions/github-script@v6
# with:
# script: |
# const { execSync } = require('child_process');
# const fs = require('fs');
# // Get the diff
# const diff = execSync('git diff').toString();
# // Create a comment
# const { data: comment } = await github.rest.issues.createComment({
# owner: context.repo.owner,
# repo: context.repo.repo,
# issue_number: context.payload.pull_request.number,
# body: `The following reformatting changes are suggested:\n\`\`\`\n${diff}\n\`\`\``
# });
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}