apollo icon indicating copy to clipboard operation
apollo copied to clipboard

chore: use Google Java Format to format Java code automaticlly by github action

Open Anilople opened this issue 3 years ago • 11 comments

What's the purpose of this PR

Auto format Java code when people push or pull request.

Which issue(s) this PR fixes:

Fixes #4196

Brief changelog

  • Add a workflow .github/workflows/google-java-format.yml

Follow this checklist to help us incorporate your contribution quickly and easily:

  • [x] Read the Contributing Guide before making this pull request.
  • [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [ ] Write necessary unit tests to verify the code.
  • [x] Run mvn clean test to make sure this pull request doesn't break anything.
  • [x] Update the CHANGES log.

Anilople avatar Jan 08 '22 14:01 Anilople

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

github-actions[bot] avatar Jan 08 '22 14:01 github-actions[bot]

Codecov Report

Merging #4200 (16c62bc) into master (96ee53a) will increase coverage by 0.01%. The diff coverage is n/a.

:exclamation: Current head 16c62bc differs from pull request most recent head 1d73cc1. Consider uploading reports for the commit 1d73cc1 to get more accurate results Impacted file tree graph

@@             Coverage Diff              @@
##             master    #4200      +/-   ##
============================================
+ Coverage     52.56%   52.58%   +0.01%     
- Complexity     2623     2625       +2     
============================================
  Files           484      484              
  Lines         15200    15200              
  Branches       1571     1571              
============================================
+ Hits           7990     7993       +3     
+ Misses         6651     6650       -1     
+ Partials        559      557       -2     
Impacted Files Coverage Δ
.../framework/apollo/spring/property/SpringValue.java 89.47% <0.00%> (+1.75%) :arrow_up:
...rk/apollo/spring/property/SpringValueRegistry.java 89.18% <0.00%> (+5.40%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 96ee53a...1d73cc1. Read the comment docs.

codecov-commenter avatar Jan 08 '22 14:01 codecov-commenter

@apolloconfig/committers

Is it possible let @github-actions sign the CLA?

Anilople avatar Jan 08 '22 14:01 Anilople

@apolloconfig/committers

Is it possible let @github-actions sign the CLA?

What about add github-actions to this JSON file directly?

zouyx avatar Jan 10 '22 15:01 zouyx

@apolloconfig/committers

Is it possible let @github-actions sign the CLA?

@Anilople @zouyx We could add github-actions to allowlist as shown below to skip cla check.

https://github.com/apolloconfig/apollo/blob/0e4542e4153bd4660dd1af6084ea4a1e9a9d17fe/.github/workflows/cla.yml#L40

nobodyiam avatar Jan 11 '22 01:01 nobodyiam

@apolloconfig/committers Is it possible let @github-actions sign the CLA?

@Anilople @zouyx We could add github-actions to allowlist as shown below to skip cla check.

https://github.com/apolloconfig/apollo/blob/0e4542e4153bd4660dd1af6084ea4a1e9a9d17fe/.github/workflows/cla.yml#L40

Done.

Anilople avatar Jan 11 '22 13:01 Anilople

@Anilople It looks like we need to submit a standalone pull request to add github-actions to allowlist first or it won't be effective for this pull request.

nobodyiam avatar Jan 12 '22 00:01 nobodyiam

recheck

nobodyiam avatar Jan 12 '22 14:01 nobodyiam

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

stale[bot] avatar Feb 17 '22 03:02 stale[bot]

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

stale[bot] avatar Mar 23 '22 15:03 stale[bot]

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

stale[bot] avatar Apr 23 '22 11:04 stale[bot]