feat!: add tooltip APIs to context-menu and menu-bar items #274
This file contains hidden or 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
| name: Format Check | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| format-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout PR code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Setup JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Run Spotless formatting | |
| run: mvn spotless:apply -B -ntp -q | |
| - name: Check for formatting changes | |
| id: check | |
| run: | | |
| modified=$(git status --porcelain) | |
| if [ -n "$modified" ]; then | |
| echo "has_changes=true" >> "$GITHUB_OUTPUT" | |
| { | |
| echo 'file_list<<EOF' | |
| echo "$modified" | |
| echo 'EOF' | |
| } >> "$GITHUB_OUTPUT" | |
| else | |
| echo "has_changes=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Find existing formatter comment | |
| if: always() | |
| uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad | |
| id: find-comment | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body-includes: '<!-- tc-formatter -->' | |
| - name: Post or update formatter comment | |
| if: steps.check.outputs.has_changes == 'true' | |
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
| edit-mode: replace | |
| body: | | |
| <!-- tc-formatter --> | |
| ### Formatting issues found | |
| The following files have formatting issues. Please run `mvn spotless:apply` and commit the changes. | |
| ``` | |
| ${{ steps.check.outputs.file_list }} | |
| ``` | |
| - name: Delete formatter comment if clean | |
| if: steps.check.outputs.has_changes == 'false' && steps.find-comment.outputs.comment-id != '' | |
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 | |
| with: | |
| comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
| edit-mode: replace | |
| body: | | |
| <!-- tc-formatter --> | |
| _Formatting issues resolved._ | |
| - name: Fail if formatting issues found | |
| if: steps.check.outputs.has_changes == 'true' | |
| run: | | |
| echo "::error::Formatting issues found. Run 'mvn spotless:apply' to fix." | |
| exit 1 |