forked from CurtinFRC/2024-Crescendo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
257 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
* text=auto | ||
*.sh text eol=lf | ||
*.bat text eol=crlf | ||
*.gradle text eol=lf | ||
*.java text eol=lf | ||
*.json text eol=lf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Comment Commands | ||
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", | ||
}); | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GITHUB_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.GITHUB_TOKEN }}" | ||
NUMBER: ${{ github.event.issue.number }} | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 | ||
- name: Install wpiformat | ||
run: pip3 install wpiformat | ||
- name: Run wpiformat | ||
run: wpiformat | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.