Skip to content

[INFRA] Adding a GitHub action to comment community PRs. #1

[INFRA] Adding a GitHub action to comment community PRs.

[INFRA] Adding a GitHub action to comment community PRs. #1

name: "Community contribution"
on:
pull_request:
types: [ 'opened', 'reopened' ]
jobs:
# Add a comment to manually start Buildkite for community contributions
community-pr-message:
env:
EUI_REPO: ${{ github.event.pull_request.base.repo.url }}
HEAD_REPO: ${{ github.event.pull_request.head.repo.url }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
runs-on: ubuntu-latest
steps:
- name: "Print repo URLs"
run: |
echo "EUI: ${{ env.EUI_REPO }}"
echo "Head: ${{ env.HEAD_REPO }}"
- name: "Add community comment"
# Assume forked repo PR if these URLs are not the same
if: ${{ env.EUI_REPO != env.HEAD_REPO }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Since this is a community submitted pull request, a Buildkite build has not been kicked off automatically. Would an Elastic organization member please verify the contents of this patch and then kick off a build manually?
pr_number: ${{ env.PULL_REQUEST_NUMBER }}