chia7712 commented on code in PR #17881: URL: https://github.com/apache/kafka/pull/17881#discussion_r1854398151
########## .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: does `/repos/apache/kafka/contributors` return "committers"? it seems to return top contributors -- 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