Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robertjgabriel/github-issue-logger
A module for logging errors as issues on the github repos issues tab.
https://github.com/robertjgabriel/github-issue-logger
jest logger logging node travis
Last synced: 5 days ago
JSON representation
A module for logging errors as issues on the github repos issues tab.
- Host: GitHub
- URL: https://github.com/robertjgabriel/github-issue-logger
- Owner: RobertJGabriel
- License: mit
- Created: 2018-05-15T02:55:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-15T20:34:19.000Z (over 6 years ago)
- Last Synced: 2024-11-14T00:42:55.518Z (2 months ago)
- Topics: jest, logger, logging, node, travis
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/github-issue-logger
- Size: 417 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-issue-logger [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
> A module for logging errors as issues on the github repos issues tab.## Installation
```sh
$ npm install --save github-issue-logger
```## Usage
```js
const githubIssueLogger = require('github-issue-logger');githubIssueLogger.setToken('github personal token');
const repoName = 'app-seo-checks';
const repoOwner = 'robertjgabriel';
const issueTitle = 'Issue title';
const issueBody = 'More details';githubIssueLogger.createIssue(repoName, repoOwner, issueTitle, issueBody).then(data =>{
console.log(data);// See repsonses
});
// This will return and object.
```## Responses
### On Error
```js
{
extra: '',
status: 'error',
url: 'https://api.github.com/repos/robertjgabriel/app-seo-checka/issues'
}
```### On incorrect setup
```js
{
extra: '',
status: 'Not Found',
url: 'https://api.github.com/repos/robertjgabriel/app-seo-checka/issues'
}
```### On Success
```js
{
extra: '',
status: 'Created',
url: 'https://api.github.com/repos/robertjgabriel/app-seo-checka/issues'
}
```## Getting github personal token.
### How to
Clear more [here](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
### Set environment variable
```js
process.env.githubPersonalToken = 'Token'
```## License
MIT © [Robert James Gabriel](https://www.robertgabriel.ninja)
[npm-image]: https://badge.fury.io/js/github-issue-logger.svg
[npm-url]: https://npmjs.org/package/github-issue-logger
[travis-image]: https://travis-ci.org/RobertJGabriel/github-issue-logger.svg?branch=master
[travis-url]: https://www.travis-ci.com/RobertJGabriel/github-issue-logger
[daviddm-image]: https://david-dm.org/RobertJGabriel/github-issue-logger.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/RobertJGabriel/github-issue-logger
[coveralls-image]: https://coveralls.io/repos/RobertJGabriel/github-issue-logger/badge.svg
[coveralls-url]: https://coveralls.io/r/RobertJGabriel/github-issue-logger