KAFKA-17251: Avoid WARN on cleanup when state directory only contains process metadata. #126
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
| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # Credits a reviewer in the PR's `Reviewers:` trailer when they leave a | |
| # top-level comment on the PR. This complements pr-reviewers-trailer-on-review | |
| # (which handles the Review/Approve path). | |
| # | |
| # `issue_comment` is not subject to the first-time-contributor approval gate | |
| # and always runs the workflow from the base repo's default branch, so fork | |
| # code never executes here. | |
| name: Reviewers Trailer (on comment) | |
| on: | |
| issue_comment: | |
| types: [created] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| append-trailer: | |
| # Only run on PR comments (issue_comment also fires on plain issues). | |
| # A bot or the PR author isn't a reviewer, so skip them. | |
| if: | | |
| github.event.issue.pull_request != null && | |
| github.event.comment.user.type != 'Bot' && | |
| github.event.comment.user.login != github.event.issue.user.login | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Env | |
| run: printenv | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Append reviewer trailer | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.issue.number }} | |
| REVIEWER_LOGIN: ${{ github.event.comment.user.login }} | |
| run: python .github/scripts/pr-reviewers-trailer.py |