{"id":15659011,"url":"https://github.com/zachleat/github-issue-to-json-file","last_synced_at":"2025-05-05T17:05:15.590Z","repository":{"id":137956096,"uuid":"471446565","full_name":"zachleat/github-issue-to-json-file","owner":"zachleat","description":"Convert a well formed GitHub Issue Form populated Markdown body into a JSON data file in the repository.","archived":false,"fork":false,"pushed_at":"2023-02-02T00:45:41.000Z","size":940,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T22:32:21.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zachleat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-03-18T16:48:59.000Z","updated_at":"2024-05-06T09:45:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c35f970-1cd4-4a39-9ae8-d485cae95be2","html_url":"https://github.com/zachleat/github-issue-to-json-file","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Fgithub-issue-to-json-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Fgithub-issue-to-json-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Fgithub-issue-to-json-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Fgithub-issue-to-json-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zachleat","download_url":"https://codeload.github.com/zachleat/github-issue-to-json-file/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252542062,"owners_count":21764907,"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":[],"created_at":"2024-10-03T13:14:40.586Z","updated_at":"2025-05-05T17:05:15.548Z","avatar_url":"https://github.com/zachleat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `github-issue-to-json-file`\n\n## Step 1: Create a [GitHub Issue Form template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms) for your repository.\n\n* Sample [`.github/ISSUE_TEMPLATE/built-with-eleventy.yml` on the `11ty-community` Repo](https://github.com/11ty/11ty-community/blob/main/.github/ISSUE_TEMPLATE/built-with-eleventy.yml)\n* [Live Demo](https://github.com/11ty/11ty-community/issues/new?assignees=\u0026labels=built-with-eleventy\u0026template=built-with-eleventy.yml\u0026title=%5BBuilt+with+Eleventy%5D+I+built+something%21)\n\n1. Use `labels: built-with-eleventy` with a label name of your choosing. This will be used later.\n2. You can control how these fields are parsed and normalized in the `body-\u003eattributes.description` field. Right now we provide:\n    * `[parser:url]` to normalize URL inputs (adds the protocol, follow redirects to find final URL). Uses [`normalize-url`](https://www.npmjs.com/package/normalize-url) and [`follow-url-redirects`](https://www.npmjs.com/package/follow-url-redirects).\n    * `[parser:usernames]` runs on a String of whitespace separated usernames (removing commas, `@` characters from the beginning) and returns an Array.\n3. Other:\n    * A single checkbox is converted to a Boolean value.\n\n## Step 2: Add the GitHub Actions Workflow file\n\n* Sample [`.github/workflows/issue-to-data-file.yml` on the `11ty-community` Repo](https://github.com/11ty/11ty-community/blob/main/.github/workflows/issue-to-data-file.yml)\n\nCheck out the comments below to see the customization options:\n\n* Runs on: Issue opened, Issue edited, Issue reopened\n* Control the output folder for the JSON files\n* Control which GitHub Issue Form template you want to generate data from\n* Use a value from the input to generate a hash for the data’s file name.\n\n```yml\nname: Convert Issues to JSON Data\n\non:\n  issues:\n    # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues\n    types:\n      - opened\n      - edited\n      - reopened\n      - labeled\n\njobs:\n  update_library:\n    runs-on: ubuntu-latest\n    name: Convert New built-with-eleventy Issue to Sites Data\n    # only continue if issue has \"built-with-eleventy\" label\n    # require an `approved` label for moderation\n    if: contains( github.event.issue.labels.*.name, 'built-with-eleventy') \u0026\u0026 contains( github.event.issue.labels.*.name, 'approved')\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n      - name: GitHub Issue to JSON\n        uses: zachleat/github-issue-to-json-file@v3.0.14\n        with:\n          # This controls where the JSON files are generated\n          folder: \"built-with-eleventy/\"\n          # This tells the action which GitHub Issue Form template file to use\n          issue-template: \"built-with-eleventy.yml\"\n          # This controls which property we use to key the file name hash off of (values should be unique in your data set)\n          hash-property-name: \"url\"\n      - name: Commit files\n        run: |\n          git config --local user.email \"action@github.com\"\n          git config --local user.name \"GitHub Action\"\n          git add *\n          git commit -m \"Adding data for #${{ env.IssueNumber }}\"\n          git push\n      - name: Close issue\n        uses: peter-evans/close-issue@v1\n        with:\n          issue-number: \"${{ env.IssueNumber }}\"\n          comment: \"Thank you! Your data file has been added!\"\n```\n\n## Step 3: There is no step 3\n\nModified graciously from @katydecorah’s https://github.com/katydecorah/wordle-to-yaml-action\n\n## Future Ideas Roadmap:\n\n* Add `allow-overwrites` input, e.g.\n\n```\n  allow-overwrites:\n    description: Whether or not a file can overwrite an existing file\n    default: true\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachleat%2Fgithub-issue-to-json-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzachleat%2Fgithub-issue-to-json-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachleat%2Fgithub-issue-to-json-file/lists"}