Receives requests from the Form Dispatcher and creates a GitHub issue via the GitHub API.
||The name of a repository you want to create an issue for
(The repository must be under the City of Austin organization and the relevant machine user must be added as a collaborator on that repository.)
||The title of the GitHub issue.|
||The user-submitted description|
||Metadata collected on the client-side such as browser, OS, and device
The app will return one of two JSON responses to the Form Dispatcher, which will then be returned to the browser. Failures and responses will each have a
status ("success" or "error"),
body value. Successful responses will also include a
url parameter which will contain the URL for the newly-created issue.
The original feature spec stipulated that browser/os/device data should be included in the form submission. This is handled via the
meta parameter, the value of which is appended to the bottom of the GitHub issue body.
To authenticate a new machine user:
- Create a new account on Github (this is your machine user)
- Create an Access Token (this will be how you make API requests as the machine user)
- Add the machine user as a collaborator on the repo(s) you want to create issues for with that machine user
- Add the token to your heroku 'GITHUB_FEEDBACK_TOKEN' env variable (in heroku -> settings -> reveal config vars)
Store your desired machine user access token(s) as environment variables, and add them to the relevant array(s) in the
token_for(repository) method in
Used in conjunction with the Form Dispatcher, the application runs locally on port 3003.
$ bundle install $ rails s -p 3003