[ES|QL] Lookup join - Open in discover tab support #1269
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Request review from Copilot for specific team PRs | |
| on: | |
| pull_request_target: | |
| types: | |
| - ready_for_review | |
| branches: | |
| - 'main' | |
| jobs: | |
| request_review: | |
| name: Request review from Copilot | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| if: github.event.repository.fork == false | |
| steps: | |
| - name: Check for team labels | |
| id: check_labels | |
| run: | | |
| # Team labels that should get Copilot reviews automatically | |
| TEAMS=( | |
| "Team:Operations" | |
| ) | |
| PR_LABELS='${{ toJson(github.event.pull_request.labels.*.name) }}' | |
| SHOULD_REQUEST_REVIEW=false | |
| for team in "${TEAMS[@]}"; do | |
| if echo "$PR_LABELS" | grep -q "\"$team\""; then | |
| echo "Found matching team label: $team" | |
| SHOULD_REQUEST_REVIEW=true | |
| break | |
| fi | |
| done | |
| echo "should_request_review=$SHOULD_REQUEST_REVIEW" >> $GITHUB_OUTPUT | |
| - name: Request Copilot review | |
| if: steps.check_labels.outputs.should_request_review == 'true' | |
| env: | |
| GITHUB_TOKEN: ${{secrets.KIBANAMACHINE_TOKEN}} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| # "Requesting Copilot review for PR #$PR_NUMBER" | |
| # Workaround from https://github.com/cli/cli/issues/10598 | |
| if gh api --method POST "/repos/elastic/kibana/pulls/${PR_NUMBER}/requested_reviewers" \ | |
| -f "reviewers[]=copilot-pull-request-reviewer[bot]" > /dev/null; then | |
| echo "Successfully requested Copilot review" | |
| else | |
| echo "Failed to request Copilot review" | |
| exit 1 | |
| fi |