Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useful user feedback titles #152

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### Next version

### 4.0.1

* Use more descriptive title for Github issues generated from User Feedback.

### 4.0.0

* Removed conversion service (no longer used in TerriaJS 8+).
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ To run the server in the foreground, you can do this:

`node . [arguments as above]`

NB: You may need to change the `issuesUrl` in serverconfig.json if the issues repo has been moved.
You may need to comment out the `https` block in serverconfig.json to prevent the application looking for keys if you are just testing locally and not transferring sensitive data.

#### Tests

1. Run `npm test`
Expand Down
2 changes: 1 addition & 1 deletion lib/controllers/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = function(options) {
'Authorization': `token ${options.accessToken}`
},
body: JSON.stringify({
title: parameters.title ? parameters.title : 'User Feedback',
title: (parameters.title || `User Feedback: ${parameters.comment || req.header('Referrer')}`).slice(0, 128), // limit the title to 128 characters
body: formatBody(req, parameters, options.additionalParameters)
})
}, function(error, response, body) {
Expand Down
2 changes: 1 addition & 1 deletion serverconfig.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
// And creates a GitHub issue based on the feedback.
feedback: {
userAgent: "TerriaBot (TerriaJS Feedback)",
issuesUrl: "https://api.github.com/repos/TerriaJS/NationalMap-Feedback/issues",
issuesUrl: "https://api.github.com/repos/TerriaJS/saas-feedback/issues",
accessToken: "provide your GitHub access token here",
// Add additional suported feedback parameters if required on a custom feedback form.
// name gives the key that the parameter uses and descriptiveLabel is used as the title for the parameter in the GitHub issue description.
Expand Down