Skip to content

Setting Rotation Target angle at Start and End Points (precisely, and to point towards points, or mouse click) #1021

Setting Rotation Target angle at Start and End Points (precisely, and to point towards points, or mouse click)

Setting Rotation Target angle at Start and End Points (precisely, and to point towards points, or mouse click) #1021

name: Format Command
on:
issue_comment:
types: [ created ]
jobs:
format:
if: github.event.issue.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",
});
- name: Checkout repo
uses: actions/checkout@v4
with:
token: ${{ secrets.COMMENT_COMMAND_PAT }}
- name: Fetch all history and metadata
run: |
git fetch --prune --unshallow
git checkout -b pr
git branch -f main origin/main
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.24.3
cache: true
cache-path: ${{ runner.tool_cache }}/flutter/linux
- name: Setup java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Checkout PR
run: |
gh pr checkout $NUMBER
env:
GITHUB_TOKEN: "${{ secrets.COMMENT_COMMAND_PAT }}"
NUMBER: ${{ github.event.issue.number }}
- name: Format dart
run: dart format lib/* test/*
- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: ./pathplannerlib
- name: Format PPLib
run: ./gradlew spotlessApply
working-directory: ./pathplannerlib
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -am "Apply formatting changes"
git push