diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 0000000000..d4d367cfce --- /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 + with: + command: review + pull_number: ${{ github.event.pull_request.number }} + git_dir: '.' diff --git a/synth.metadata b/synth.metadata index d47379a450..d2f0cc4d53 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-spanner.git", - "sha": "81b07e31a6a63a795d904094a72a6b51e593c314" + "sha": "3914577b643d96aa3d61de86251c0ab068c96938" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" + "sha": "b65ef07d99946d23e900ef2cc490274a16edd336" } } ], @@ -63,6 +63,7 @@ ".github/trusted-contribution.yml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", + ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh",