{"id":15514173,"url":"https://github.com/petems/csv-to-md-table-action","last_synced_at":"2025-07-08T08:05:00.585Z","repository":{"id":36990191,"uuid":"296924894","full_name":"petems/csv-to-md-table-action","owner":"petems","description":"A Github action to convert CSV to markdown","archived":false,"fork":false,"pushed_at":"2025-07-01T23:45:03.000Z","size":1346,"stargazers_count":13,"open_issues_count":9,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T00:28:05.792Z","etag":null,"topics":["csv","github-actions","markdown","markdown-to-csv"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-19T18:06:32.000Z","updated_at":"2025-04-28T21:16:20.000Z","dependencies_parsed_at":"2024-05-01T14:18:38.226Z","dependency_job_id":"a929d88d-3eb7-42c9-9d70-1343e90d264b","html_url":"https://github.com/petems/csv-to-md-table-action","commit_stats":{"total_commits":137,"total_committers":18,"mean_commits":7.611111111111111,"dds":0.4014598540145985,"last_synced_commit":"0376c699f4e836171705688d2fc93dbe90ea1ce4"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/petems/csv-to-md-table-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petems%2Fcsv-to-md-table-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petems%2Fcsv-to-md-table-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petems%2Fcsv-to-md-table-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petems%2Fcsv-to-md-table-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petems","download_url":"https://codeload.github.com/petems/csv-to-md-table-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petems%2Fcsv-to-md-table-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264229252,"owners_count":23576239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","github-actions","markdown","markdown-to-csv"],"created_at":"2024-10-02T09:57:49.199Z","updated_at":"2025-07-08T08:05:00.553Z","avatar_url":"https://github.com/petems.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# csv-to-md-table-action\n\nThis action prints converts a given CSV to a markdown formatted table\n\n## Inputs\n\n### `csvinput`\n\n**Required** CSV to be converted.\n\n## Outputs\n\n### `markdown-table`\n\nThe markdown formatted table\n\n## Example usage\n\n```yaml\nuses: petems/csv-to-md-table-action@master\nwith:\n  csvinput: | \n    First Name, Last Name, Address, Town, State, Zip\n    John,Doe,120 jefferson st.,Riverside, NJ, 08075\n    Jack,McGinnis,220 hobo Av.,Phila, PA,09119\n```\n\nYou can then take the output to post comments on pull-requests for example:\n\n```yaml\non:\n  pull_request:\n    paths:\n      - '*/**.csv'\n\njobs:\n  build:\n    name: Comment CSV as Pull-request Table\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Repo\n        uses: actions/checkout@master\n      - name: Read CSV\n        id: csv\n        uses: juliangruber/read-file-action@v1\n        with:\n          path: ./people.csv\n      - name: Create MD\n        uses: petems/csv-to-md-table-action@master\n        id: csv-table-output\n        with:\n          csvinput: ${{ steps.csv.outputs.content }}\n      - uses: mshick/add-pr-comment@v1\n        with:\n          message: |\n            ${{steps.csv-table-output.outputs.markdown-table}}\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n          repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens\n          allow-repeats: true\n```\n\nSo when you make a change to CSV file via pull-request, it makes a comment with the table:\n![image](https://user-images.githubusercontent.com/1064715/93686821-e0260e80-fab0-11ea-8932-4424172c8190.png)\n\nThere's a demo of it in action here: https://github.com/petems/csv-table-comment-example\n\n## Testing\n\nInstall the dependencies\n\n```bash\nnpm install\n```\n\nRun the tests :heavy_check_mark:\n\n```bash\n$ npm test\n\n\u003e javascript-action@1.0.0 test /Users/petersouter/projects/csv-to-md-table-action\n\u003e jest\n\n PASS  ./index.test.js\n  ✓ parses csv and converts to valid markdown table (138ms)\n...\n```\n\n## Package for distribution\n\nGitHub Actions will run the entry point from the action.yml. Packaging assembles the code into one file that can be checked in to Git, enabling fast and reliable execution and preventing the need to check in node_modules.\n\nActions are run from GitHub repos.  Packaging the action will create a packaged action in the dist folder.\n\nRun prepare\n\n```bash\nnpm run prepare\n```\n\nSince the packaged index.js is run from the dist folder.\n\n```bash\ngit add dist\n```\n\n## Create a release branch\n\nUsers shouldn't consume the action from master since that would be latest code and actions can break compatibility between major versions.\n\nCheckin to the v1 release branch\n\n```bash\ngit checkout -b v1\ngit commit -a -m \"v1 release\"\n```\n\n```bash\ngit push origin v1\n```\n\nNote: We recommend using the `--license` option for ncc, which will create a license file for all of the production node modules used in your project.\n\nYour action is now published! :rocket:\n\nSee the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetems%2Fcsv-to-md-table-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetems%2Fcsv-to-md-table-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetems%2Fcsv-to-md-table-action/lists"}