Skip to content

Workflow file for this run

name: Cherry-Pick PRs to Master
on:
pull_request:
types:
- closed
jobs:
get_labels:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Get Merged PR Labels.
id: merged_pr
run: |
PR_NUMBER=$(jq -r '.pull_request.number' "$GITHUB_EVENT_PATH")
ACCESS_TOKEN="${{ secrets.GITHUB_TOKEN }}"
LABELS=$(curl -s -H "Authorization: Bearer $ACCESS_TOKEN" "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" | jq -r '.labels[].name')
echo "Labels12: $LABELS"