chia7712 commented on code in PR #17881: URL: https://github.com/apache/kafka/pull/17881#discussion_r1855222341
########## .github/workflows/pr-update.yml: ########## @@ -45,3 +47,40 @@ jobs: PR_NUM: ${{github.event.number}} run: | ./.github/scripts/label_small.sh + + add-triage-label: + if: github.event.action == 'opened' || github.event.action == 'reopened' + name: Add triage label + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Env + run: printenv + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + - name: Check PR Author # The step sets output "exitcode" to 0 iff the PR is from a committer. + id: check-author + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_USER: ${{ github.event.pull_request.user.login }} + run: | + set +e + echo "Checking repo contributors for PR author $PR_USER" + FOUND_CONTRIBUTOR=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/apache/kafka/contributors --jq '.[] | select(.login == "'"$PR_USER"'") | .login') Review Comment: > Another approach is to create a list of committers by GH username. Maybe we can leverage [committers.html](https://github.com/apache/kafka-site/blob/asf-site/committers.html)? > This is related to another improvement I've been contemplating. I'd like to separate the "reviewers" (anyone in community) from the "approvers" (must be committer) in our commit messages. I love this idea! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org