brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 22786dc Raw
42 lines · yaml
1name: "Add buildbot information to first PRs from new contributors"2 3permissions:4  contents: read5 6on:7  # It's safe to use pull_request_target here, because we aren't checking out8  # code from the pull request branch.9  # See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/10  pull_request_target:11    types:12      - closed13 14jobs:15  buildbot_comment:16    runs-on: ubuntu-24.0417    permissions:18      pull-requests: write19    if: >-20      (github.repository == 'llvm/llvm-project') &&21      (github.event.pull_request.merged == true)22    steps:23      - name: Checkout Automation Script24        uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.025        with:26          sparse-checkout: llvm/utils/git/27          ref: main28 29      - name: Setup Automation Script30        working-directory: ./llvm/utils/git/31        run: |32          pip install --require-hashes -r requirements.txt33 34      - name: Add Buildbot information comment35        working-directory: ./llvm/utils/git/36        run: |37          python3 ./github-automation.py \38            --token '${{ secrets.GITHUB_TOKEN }}' \39            pr-buildbot-information \40            --issue-number "${{ github.event.pull_request.number }}" \41            --author "${{ github.event.pull_request.user.login }}"42