Skip to content

Commit

Permalink
try again?
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan1522 committed Aug 20, 2024
1 parent a95ed36 commit 2b7eaa3
Showing 1 changed file with 26 additions and 30 deletions.
56 changes: 26 additions & 30 deletions .github/workflows/comment-command.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,54 @@
name: Comment Commands

on:
issue_comment:
types: [ created ]
pull_request:
types: [opened, synchronize, reopened]

jobs:
format:
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/format')
if: github.event.pull_request && startsWith(github.event.comment.body, '/format')
runs-on: ubuntu-22.04
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
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.COMMENT_COMMAND_PAT_TOKEN }}
- name: Fetch all history and metadata
run: |
git checkout -b pr
git branch -f main origin/main
- name: Checkout PR
run: |
gh pr checkout $NUMBER
env:
GITHUB_TOKEN: "${{ secrets.COMMENT_COMMAND_PAT_TOKEN }}"
NUMBER: ${{ github.event.issue.number }}
- name: Set up Python 3.10

- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- name: Install wpiformat
run: pip3 install wpiformat==2024.40

- 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",
});
- name: Run wpiformat
run: wpiformat

- name: Run spotlessApply
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
git push

0 comments on commit 2b7eaa3

Please sign in to comment.