fix: add v-prefix to version numbers in version switcher #117
This file contains 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: Label Child Issues | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
label_child_issues: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Linked Issue | |
id: get_linked_issue | |
run: | | |
linked_issue=$(curl -sH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/timeline" \ | |
| jq -r '.[] | select(.event == "cross-referenced") | .source.issue.number' | head -n 1) | |
echo "PARENT_ISSUE=$linked_issue" >> $GITHUB_ENV | |
- name: Get Parent Issue Priority Label | |
if: env.PARENT_ISSUE | |
run: | | |
priority_label=$(curl -sH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
"https://api.github.com/repos/${{ github.repository }}/issues/${{ env.PARENT_ISSUE }}" \ | |
| jq -r '.labels[].name | select(startswith("p-"))' | head -n 1) | |
echo "PRIORITY_LABEL=$priority_label" >> $GITHUB_ENV | |
- name: Apply Labels | |
if: env.PARENT_ISSUE | |
run: | | |
labels="[\"epic-task\"" | |
if [ ! -z "${{ env.PRIORITY_LABEL }}" ]; then | |
labels="$labels, \"${{ env.PRIORITY_LABEL }}\"" | |
fi | |
labels="$labels]" | |
curl -X POST -sH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Content-Type: application/json" \ | |
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels" \ | |
-d "{\"labels\":$labels}" | |
echo "Applied labels: $labels" |