From b69e4a4da2e27c9d43ada4c85e2a5315927dd62c Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 9 Oct 2020 15:07:01 -0700 Subject: [PATCH] ci: suggest formatting fixes inline (#388) --- .github/workflows/formatting.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/formatting.yaml diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 000000000..ca266abd5 --- /dev/null +++ b/.github/workflows/formatting.yaml @@ -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 # takes the changes from git directory + with: + command: review + pull_number: ${{ github.event.pull_request.number }} + git_dir: '.'