crashpad-to-issue-node

An Heroku compatible crashpad server that makes a new issue on error.
git clone git://archive.git.mtrnord.blog/MTRNord/crashpad-to-issue-node.git
Log | Files | Refs | README

commit 5f9b8fe025ca5de539d418cf2ccd0c94156992d3
parent cb71e4c2f554788d9c98a1d4e51c191fd229ee80
Author: MTRNord <mtrnord1@gmail.com>
Date:   Fri, 23 Sep 2016 23:21:07 +0200

Initial Commit

Diffstat:
MREADME.md | 3+++
Amain.js | 35+++++++++++++++++++++++++++++++++++
Apackage.json | 29+++++++++++++++++++++++++++++
3 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -1,2 +1,5 @@ # crashpad-to-issue_node An Heroku compatible crashpad server that makes a new issue on error. + +# Code used +A lot of code is used from https://github.com/johnmuhl/electron-crash-report-server because that project is the main idea of this script diff --git a/main.js b/main.js @@ -0,0 +1,35 @@ +var GitHubApi = require("github"); +var CLIENT_ID = process.env.CLIENT_ID +var CLIENT_SECRET = process.env.CLIENT_SECRET +var USERNAME = process.env.USERNAME +var PASSWORD = process.env.PASSWORD +var github = new GitHubApi({ + // optional + debug: true, + headers: { + "user-agent": "crashpad-to-issue_node" // GitHub is happy with a unique user agent + } +}); +var heroku_url = "http://localhost" +// basic +github.authenticate({ + type: "basic", + username: USERNAME, + password: PASSWORD +}); +github.authorization.getOrCreateAuthorizationForApp({ + scopes: ["public_repo"], + client_secret: CLIENT_SECRET, + client_id: CLIENT_ID, + note: "An Heroku compatible crashpad server that makes a new issue on error.", + note_url: heroku_url +}); +github.issues.create({ + user: "MTRNord", + repo: "ls-vertretungsplan-crashlogs", + title: "CrashTest", + body: "Test", + labels: [ + "bug" + ] +}); diff --git a/package.json b/package.json @@ -0,0 +1,29 @@ +{ + "name": "crashpad-to-issue_node", + "version": "0.0.1", + "description": "An Heroku compatible crashpad server that makes a new issue on error.", + "main": "main.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/MTRNord/crashpad-to-issue_node.git" + }, + "keywords": [ + "crashpad", + "github", + "heroku", + "electron" + ], + "author": "MTRNord <info@nordgedanken.de>", + "license": "ISC", + "bugs": { + "url": "https://github.com/MTRNord/crashpad-to-issue_node/issues" + }, + "homepage": "https://github.com/MTRNord/crashpad-to-issue_node#readme", + "dependencies": { + "bluebird": "^3.4.6", + "github": "^3.1.0" + } +}