Skip to content

Fix /style functionality #4

Fix /style functionality

Fix /style functionality #4

Workflow file for this run

name: Apply Style
on:
issue_comment:
types: [created]
jobs:
apply-style:
if: startsWith(github.event.comment.body, '/style')
name: Apply Style to Source
runs-on: ubuntu-latest
steps:
# Checkout the GitHub created reference for the PR.
# The only way to do this is by using the "issue" number
# but that is really the PR number in this context.
# This is due to using an `issue_comment` event which
# is due to the GitHub Actions API that does not have
# a `pull_request_comment` event or something similar.
# This leaves us in a detached head state which is corrected
# in `apply-style/entrypoint.sh`
- name: Checkout pull request
uses: actions/checkout@v3
with:
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Apply style updates
uses: ./.github/actions/apply-style