diff --git a/CHANGES.md b/CHANGES.md index 88af57b4..1c1da063 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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+). diff --git a/README.md b/README.md index 800ae136..a00a139c 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/lib/controllers/feedback.js b/lib/controllers/feedback.js index dae3f042..53d68163 100644 --- a/lib/controllers/feedback.js +++ b/lib/controllers/feedback.js @@ -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) { diff --git a/serverconfig.json.example b/serverconfig.json.example index 8576a148..5f174f6b 100644 --- a/serverconfig.json.example +++ b/serverconfig.json.example @@ -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.