{"id":15538143,"url":"https://github.com/benbalter/problem_child","last_synced_at":"2026-03-16T16:01:43.461Z","repository":{"id":25597272,"uuid":"29032158","full_name":"benbalter/problem_child","owner":"benbalter","description":"Allows authenticated or anonymous users to fill out a standard web form to create GitHub issues (and pull requests).","archived":false,"fork":false,"pushed_at":"2023-03-16T03:55:04.000Z","size":531,"stargazers_count":50,"open_issues_count":6,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T13:17:54.961Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/benbalter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2015-01-09T19:41:15.000Z","updated_at":"2024-06-20T10:21:10.737Z","dependencies_parsed_at":"2024-06-20T10:20:46.382Z","dependency_job_id":"82715a3e-b074-4bab-a319-2022d4eaa55a","html_url":"https://github.com/benbalter/problem_child","commit_stats":{"total_commits":63,"total_committers":3,"mean_commits":21.0,"dds":"0.15873015873015872","last_synced_commit":"cd06f0f174c37a5a5ee3cc655a0f0e824b362ce6"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbalter%2Fproblem_child","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbalter%2Fproblem_child/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbalter%2Fproblem_child/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbalter%2Fproblem_child/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benbalter","download_url":"https://codeload.github.com/benbalter/problem_child/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234407442,"owners_count":18827627,"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-02T12:02:05.869Z","updated_at":"2025-09-28T13:30:40.688Z","avatar_url":"https://github.com/benbalter.png","language":"Ruby","funding_links":[],"categories":["Tips, tricks, tools, and add-ons for GitHub power users"],"sub_categories":[],"readme":"# Problem Child\n\nAllows authenticated or anonymous users to fill out a standard web form to create GitHub issues.\n\n[![Build Status](https://travis-ci.org/benbalter/problem_child.svg)](https://travis-ci.org/benbalter/problem_child) [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)\n\n## How it works\n\n1. You create a standard HTML form, defining what fields you'd like a given authenticated or anonymous user to fill out\n2. They go to a hosted URL and fill out the form\n3. The fields are converted to markdown bullets and inserted into the body of a new issue created against the GitHub repo you specify\n\n## Usage\n\n1. Create a `Gemfile` and add `gem \"problem_child\"`\n2. Create a `config.ru` file and add the following:\n\n```ruby\nrequire \"problem_child\"\nrun ProblemChild::App\n```\n\nThen, follow the configuration options below.\n\n## Configuring\n\nFirst, you must set the following environmental variable:\n\n* `GITHUB_REPO` - the repo to open the issue against in the form of `owner/repo`\n\nYou must also set **one** of the following:\n\n* `GITHUB_TOKEN` - A personal access token for a bot account with the ability to create an issue in the `GITHUB_REPO` if you would like all submissions to be anonymous\n* `GITHUB_ORG_ID` - The GitHub Org ID e.g, `@whitehouse` if you'd like all users to authenticate against a GitHub Org prior to being presented the form, or\n* `GITHUB_TEAM_ID` - The numeric Team ID (e.g., 1234) if you'd like all users to authenticate against a GitHub Team prior to being presented the form\n\nIf you are using OAuth Authentication (e.g., you set `GITHUB_ORG_ID` or `GITHUB_TEAM_ID` so that the user submits as themselves), you must also set the following as environmental variables:\n\n* `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` - Created via [github.com/settings/applications/new](https://github.com/settings/applications/new)\n\n*Pro-tip*: When developing locally, you can add these values to a `.env` file in the project root, and they will be automatically read in on load\n\n## Customizing\n\nBy default, Problem Child will prompt the user with a simple form that contains only the title and body. If you'd like to customize the form, you must do the following:\n\n1. Create a new directory called `views`\n2. Create a `layout.erb` and `form.erb`\n3. Customize both the layout and form as a standard HTML form. Check out [these examples](lib/problem_child/views) to get started.\n4. Add the following (middle) line to your `config.ru` file:\n\n```ruby\nrequire \"problem_child\"\nProblemChild.views_dir = \"/path/to/your/views/directory\"\nrun ProblemChild::App\n```\n\n*Pro-tip*: You can use any standard HTML form fields, but be sure to name one field `title`, which will become the issue title.\n\n*Pro-tip II*: Problem child can set labels. You can do this either as a hidden field:\n\n```html\n\u003cinput type=\"hidden\" name=\"labels[]\" value=\"bug\" /\u003e\n```\n\nor as a checkbox:\n\n```html\n\u003cinput type=\"checkbox\" name=\"labels[]\" value=\"bug\" /\u003e\n\u003cinput type=\"checkbox\" name=\"labels[]\" value=\"suggestion\" /\u003e\n```\n\n*Pro-tip III*: Set the public directory\n\nBy default Problem child points to an internal public directory which includes jQuery and Twitter Bootstrap. You can add them to your custom layout.erb:\n\n```html\n\u003clink href=\"/vendor/bootstrap/dist/css/bootstrap.min.css\" rel=\"stylesheet\"\u003e\n\n\u003cscript src=\"/vender/jquery/dist/jquery.min.js\"\u003e\u003c/script\u003e\n```\n\nHowever, if you would like to add more files to your form app (e.g., favicon, custom CSS \u0026 JS files, etc.), you can redefine where the public directory points:\n\n```ruby\nrequire \"problem_child\"\nProblemChild.views_dir = \"/path/to/your/views/directory\"\nProblemChild.public_dir = Rails.public_path\nrun ProblemChild::App\n```\n\nNote that you will lose access to the bundled jQuery \u0026 Bootstrap libraries and will have to put copies into your new public directory to use them.\n\n## Creating pull requests\n\nProblem child can also be used to create pull requests. Simply add one or more file inputs to your form. The uploaded files will be committed to a newly created feature branch, and a pull request will be created against the repo's primary branch with the rest of the form content. You'll also want to change the form type to `enctype=\"multipart/form-data\"`.\n\n```html\n\u003cform method=\"post\" enctype=\"multipart/form-data\"\u003e\n  \u003cinput type=\"file\" name=\"file\" /\u003e\n  \u003cinput type=\"submit\" /\u003e\n\u003c/form\u003e\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/problem_child/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbalter%2Fproblem_child","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenbalter%2Fproblem_child","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbalter%2Fproblem_child/lists"}