Skip to content

Parse Issue

Parse Issue #8

Workflow file for this run

# Parse issue body with block-parser
name: Parse Issue
on:
workflow_dispatch:
inputs:
issue:
description: 'Issue number'
required: true
default: '115'
type: string
jobs:
parse:
runs-on: ubuntu-latest
steps:
- name: Get latest release tag
id: release
run: |
TAG=$(curl -s "https://api.github.com/repos/DavidWells/markdown-magic/releases" | \
grep -o '"tag_name": "comment-block-parser@[^"]*"' | head -1 | cut -d'"' -f4)
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Cache block-parser
id: cache
uses: actions/cache@v4
with:
path: block-parser
key: block-parser-linux-x64-${{ steps.release.outputs.tag }}
- name: Download block-parser
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl -sL "https://github.com/DavidWells/markdown-magic/releases/download/${{ steps.release.outputs.tag }}/block-parser-linux-x64" -o block-parser
chmod +x block-parser
- name: Parse issue
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue view ${{ inputs.issue }} --repo ${{ github.repository }} --json body -q '.body' | ./block-parser auto | jq '.blocks[0].options'