forked from Bram-Hub/LEGUP
-
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.
Merge branch 'master' of https://github.com/jadeandtea/LEGUP_FORK
- Loading branch information
Showing
1,058 changed files
with
36,445 additions
and
14,732 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
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,93 @@ | ||
name: Java Code Auto Format | ||
on: pull_request | ||
|
||
jobs: | ||
format_dev: | ||
if: | | ||
github.event.pull_request.head.ref == 'dev' && | ||
github.event.pull_request.head.repo.full_name == github.repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 21 | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build -x test | ||
|
||
- name: Run spotless | ||
run: ./gradlew :spotlessApply | ||
|
||
- name: Check for modified files | ||
id: git-check | ||
run: echo "modified=$(if [[ -n $(git status -s) ]]; then echo "true"; else echo "false"; fi)" >> $GITHUB_OUTPUT | ||
|
||
- name: Create temporary branch and pull request | ||
if: steps.git-check.outputs.modified == 'true' | ||
run: | | ||
git config --global user.name 'Bram van Heuveln' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
branch_name="auto-format-code-$(date +%s)" | ||
git checkout -b $branch_name | ||
./gradlew :spotlessApply | ||
git add . | ||
git commit -am "Automated Java code formatting changes" | ||
git push --set-upstream origin $branch_name | ||
gh pr create -B dev -H $branch_name --title 'Automated Java code formatting changes' --body 'This pull request contains automated code formatting changes.' --reviewer ${{ github.actor }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Must approve auto-format pull request | ||
if: steps.git-check.outputs.modified == 'true' | ||
run: | | ||
echo "Please review and approve the appropriate auto-format-code pull request." | ||
exit 1 | ||
format_pull_request_to_dev: | ||
if: | | ||
github.event.pull_request.base.ref == 'dev' && | ||
github.event.pull_request.head.repo.full_name == github.repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 21 | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build -x test | ||
|
||
- name: Run spotless | ||
run: ./gradlew :spotlessApply | ||
|
||
- name: Check for modified files | ||
id: git-check | ||
run: echo "modified=$(if [[ -n $(git status -s) ]]; then echo "true"; else echo "false"; fi)" >> $GITHUB_OUTPUT | ||
|
||
- name: Push changes | ||
if: steps.git-check.outputs.modified == 'true' | ||
run: | | ||
git config --global user.name 'Bram van Heuveln' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
git add . | ||
git commit -am "Automated Java code formatting changes" | ||
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,13 @@ | ||
arguments=--init-script /home/gamma/.cache/jdtls/config/org.eclipse.osgi/55/0/.cp/gradle/init/init.gradle | ||
auto.sync=false | ||
build.scans.enabled=false | ||
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) | ||
connection.project.dir= | ||
eclipse.preferences.version=1 | ||
gradle.user.home= | ||
java.home=/usr/lib/jvm/java-21-openjdk-amd64 | ||
jvm.arguments= | ||
offline.mode=false | ||
override.workspace.settings=true | ||
show.console.view=true | ||
show.executions.view=true |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.