GitXplorerGitXplorer
p

json-to-markdown-table

public
2 stars
0 forks
2 issues

Commits

List of commits on branch main.
Verified
187d18309f7c7984a6e9147f3f541004b0d1711d

chore(main): release 1.1.2 (#18)

rrelease-please[bot] committed 3 months ago
Verified
5a91695b180a41b81a99a203122fbeb7cd1fd857

build: update changelog type to github

pparkerbxyz committed 3 months ago
Verified
300de1f2ca5cb0b97712e8c4f024ba1a65e9c03c

build(deps-dev): bump the development-dependencies group with 2 updates (#15)

ddependabot[bot] committed 3 months ago
Verified
6700a357c0d879f60c501f0de9316d2440b8d250

fix(deps): bump @actions/core from 1.10.1 to 1.11.1 (#16)

ddependabot[bot] committed 3 months ago
Verified
c6aa8cc44f74536cc9a8426244f414f85d1694aa

fix(deps): bump mdast-util-to-markdown from 2.1.0 to 2.1.1 (#17)

ddependabot[bot] committed 3 months ago
Verified
f8677caa9f029fd9fb94882005e499203137fe7b

build(deps-dev): bump the development-dependencies group across 1 directory with 3 updates (#14)

ddependabot[bot] committed 3 months ago

README

The README file for this repository.

JSON to Markdown Table

This GitHub Action converts a given JSON object to a Markdown table.

Example usage

Reusable workflow

name: Create Markdown table from JSON

on:
  workflow_call:
    inputs:
      json-object:
        description: 'The JSON object to convert to a Markdown table'
        required: true
        type: string

jobs:
  create-issue:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      issues: write
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4

      - name: Create table
        id: create-table
        uses: parkerbxyz/json-to-markdown-table@v1
        with:
          json: ${{ inputs.json-object }}
          align-pipes: 'false'

      - name: Create issue
        id: create-issue
        uses: JasonEtco/create-an-issue@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          MARKDOWN_TABLE: ${{ steps.create-table.outputs.table }}
        with:
          filename: .github/ISSUE_TEMPLATE/markdown-table.md
          update_existing: false

      - name: Print issue link to summary
        env:
          ISSUE_URL: ${{ steps.create-issue.outputs.url }}
        run: |
          if [[ "$ISSUE_URL" ]]; then
            echo "Created $ISSUE_URL." >>"$GITHUB_STEP_SUMMARY"
          else
            echo "Issue already exists." >>"$GITHUB_STEP_SUMMARY"
          fi

Inputs

json

Required The JSON object to convert to a Markdown table.

align-pipes

Set to 'false' if you do not want the table delimiters aligned.

Outputs

table

The Markdown table that was generated from the JSON object.