https://github.com/bluetel/json-to-md
GitHub Action to convert JSON object to markdown. Specifically for use with Symfony Security Checker and peter-evans/create-issue-from-file actions.
https://github.com/bluetel/json-to-md
github json markdown md
Last synced: 3 months ago
JSON representation
GitHub Action to convert JSON object to markdown. Specifically for use with Symfony Security Checker and peter-evans/create-issue-from-file actions.
- Host: GitHub
- URL: https://github.com/bluetel/json-to-md
- Owner: bluetel
- License: mit
- Created: 2020-09-17T15:05:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-09T12:13:31.000Z (over 5 years ago)
- Last Synced: 2025-02-09T23:14:45.488Z (over 1 year ago)
- Topics: github, json, markdown, md
- Language: JavaScript
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# json-to-md
This action converts a JSON returned from symfony security checker to a markdown string. This action is intended to be used with [symfonycorp/security-checker-action](https://github.com/marketplace/actions/sensiolabs-security-checker-action) and [peter-evans/create-issue-from-file](https://github.com/marketplace/actions/create-issue-from-file).
## Input
### `data`
**Required:** Stringified JSON data
## Output
### `md-data`
Final result parsed in markdown
## Example
```yml
name: Composer Security Audit
on:
pull:
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: symfonycorp/security-checker-action@v2
id: security-check
- name: Parse JSON to MD
uses: bluetel/json-to-md@v1
id: json-to-md
with:
data: ${{ steps.security-check.outputs.vulns }}
- name: Save markdown to file
shell: bash
run: |
echo "${{ steps.json-to-md.outputs.md-data }}" >> SECURITY.md
- name: Create issue
id: create-issue
uses: peter-evans/create-issue-from-file@v2
with:
title: "Security vulnerabilities found"
content-filepath: SECURITY.md
```
## Contribute
Fork this repository, make changes in your local dev environment, push to your remote and open a pull request pointing to this repository's `master` branch.