EpicKiwi / feedback-ms

Microservice handling feedbacks through GitHub issues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feedback-ms

Microservice handling feedbacks through GitHub issues

Usage

Usage of this micro-service is pretty straightfoward. After definition of a project in settings.js you can send a feedback with a simple POSt request to the root

POST /
{
	"project": "feedback-ms",
	"content": "text content of feedback"
}

---

{
	"ok": true,
	"title": "User feedback : text content of feedback",
	"content": "text content of feedback",
	"issueUrl": "https://github.com/EpicKiwi/feedback-ms/issues/8",
	"issueNumber": 8,
	"repositoryUrl": "https://github.com/EpicKiwi/feedback-ms",
	"repository": "EpicKiwi/feedback-ms",
	"date": "2019-09-24T10:44:36Z"
}

Settings

Projects must be defined in settings.js in order to be able to send a feedback

module.exports = {
    titleSize: 80,	// Maximum size of the title

    projects: {		// All projects available
        "feedback-ms": {	// id of the project
            token: process.env.GH_TOKEN,	// personal Gihub token required with write on repositories
            repository: "EpicKiwi/feedback-ms",	//Name of the repository on GitHub
            labels: ["feedback"],	// Labels to assign to the issue
            prefix: "User feedback : "	// Prefix to prepend to the first line of the feedback
        },
    }
}

Installation

Install dependencies

npm i

Start server

npm run start

Service is now available on http://localhost:3000

About

Microservice handling feedbacks through GitHub issues

License:MIT License


Languages

Language:JavaScript 93.7%Language:Shell 4.2%Language:Dockerfile 2.2%