Skip to content

Commit

Permalink
ci(java): suggest formatting fixes (#797)
Browse files Browse the repository at this point in the history
GitHub action config to run the java formatter and suggest inline fixes on the pull request.

This was tested in java-asset: [example PR](googleapis/java-asset#392).
  • Loading branch information
chingor13 authored Oct 13, 2020
1 parent 9b7fadc commit b65ef07
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
pull_request_target:
types: [opened, synchronize]
branches:
- master
name: format
jobs:
format-code:
runs-on: ubuntu-latest
env:
ACCESS_TOKEN: {{ '${{ secrets.YOSHI_CODE_BOT_TOKEN }}' }}
steps:
- uses: actions/checkout@v2
with:
ref: {{ '${{github.event.pull_request.head.ref}}' }}
repository: {{ '${{github.event.pull_request.head.repo.full_name}}' }}
- uses: actions/setup-java@v1
with:
java-version: 11
- run: "mvn com.coveo:fmt-maven-plugin:format"
- uses: googleapis/code-suggester@v1.8.0
with:
command: review
pull_number: {{ '${{ github.event.pull_request.number }}' }}
git_dir: '.'

0 comments on commit b65ef07

Please sign in to comment.