| # Copyright 2026 The IREE Authors |
| # |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| |
| name: Pull Request Greeter |
| |
| on: |
| pull_request_target: |
| types: |
| - opened |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| pr-greeter: |
| runs-on: ubuntu-24.04 |
| permissions: |
| contents: read |
| pull-requests: write |
| # Only comment on PRs opened by someone new to IREE or to GitHub as a whole. |
| if: >- |
| github.repository == 'iree-org/iree' && |
| github.event.pull_request.author_association != 'COLLABORATOR' && |
| github.event.pull_request.author_association != 'CONTRIBUTOR' && |
| github.event.pull_request.author_association != 'MANNEQUIN' && |
| github.event.pull_request.author_association != 'MEMBER' && |
| github.event.pull_request.author_association != 'OWNER' |
| steps: |
| - name: Checking out repository |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| persist-credentials: false |
| - name: Setting up Python |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| - name: Installing dependencies |
| run: python -m pip install --disable-pip-version-check PyGithub==2.4.0 |
| - name: Greet first-time contributor |
| env: |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| ISSUE_NUMBER: ${{ github.event.pull_request.number }} |
| PR_AUTHOR: ${{ github.event.pull_request.user.login }} |
| run: | |
| python ./build_tools/github_actions/github_automation.py \ |
| --token "$GH_TOKEN" \ |
| pr-greeter \ |
| --issue-number "$ISSUE_NUMBER" \ |
| --author "$PR_AUTHOR" |