Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Workflow file for this run

name: Comment Commands
on:
issue_comment:
types: [ created ]
jobs:
format:
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/format')
runs-on: ubuntu-22.04

Check failure on line 11 in .github/workflows/comment-command.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/comment-command.yml

Invalid workflow file

You have an error in your yaml syntax on line 11
steps:
- name: React Rocket
uses: actions/github-script@v7
with:
script: |
const {owner, repo} = context.issue
github.rest.reactions.createForIssueComment({
owner,
repo,
comment_id: context.payload.comment.id,
content: "rocket",
});
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT_TOKEN }}
- name: Fetch all history and metadata
run: |
git checkout -b pr
git branch -f master origin/master
- name: Checkout PR
run: |
gh pr checkout $NUMBER
env:
GITHUB_TOKEN: "${{ secrets.PAT_TOKEN }}"
NUMBER: ${{ github.event.issue.number }}
- name: Run Spotless
run: ./gradlew spotlessApply
- name: Commit
run: |
# Set credentials
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Commit
git commit -am "Formatting fixes"
git push