Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@owlnext/hel-js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@owlnext/hel-js

Redmine bugtracker API interfaces & utils for javascript technologies

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

helJS

A Javascript/Node/React API interface to Redmine bugtracker and easily add issues.

StatementsBranchesFunctionsLinesBuild Status
StatementsBranchesFunctionsLinesBuildStatus

Installation

npm -i --save @owlnext/hel-js

Usage

Import and initialize
import Hel from '@owlnext/hel-js';

// ...

const hel: Hel = new Hel({
    api_url: 'https://...',         // base URL for redmine api
    api_key: 'qsd5f4tye85rq...',    // api token for redmine api
    project_id: 1                   // redmine project id for issue reporting
});

Create a simple issue
let issue: Issue;

try {
    issue = await hel.createIssue({
        subject: "Error happens",
        description: "Some issue happened...",
        reporter_identity: "Admin Istrator",
    });
} catch (error) {
    // treat errors.
}
Create an issue with a screenshot
const screenshot_content: string = '/** the image content as base64 string **/'

let issue: Issue;

try {
    issue = await hel.createIssue({
        subject: "Error happens",
        description: "Some issue happened...",
        reporter_identity: "Admin Istrator",
        screenshots: [
            {
                name: 'screenshot_example.jpg',
                content: screenshot_content,
                content_type: 'image/jpeg'
            }
        ]
    });
} catch (error) {
    // treat errors.
}
Full example
const screenshot_content: string = '/** the image content as base64 string **/'

let issue: Issue;

try {
    issue = await hel.createIssue({
        description: "test w screenshot",
        reporter_identity: "Obi-Wan Kenobi",
        subject: "test w screenshot",
        url: "http://localhost:8822",
        session_data: "{'session_id': 43531551}",
        stack_trace: "        at /var/www/src/hel.ts:69:23\n" +
                     "        at processTicksAndRejections (internal/process/task_queues.js:95:5)\n",
        additional_data: {
            "foo": "bar"
        },
        screenshots: [
            {
                name: 'screenshot_ex.jpg',
                content: screenshot_content,
                content_type: 'image/jpeg'
            }
        ]
    });
} catch (error) {
    // treat errors.
}

License

This module is under MIT license.

Naming

Hel (Old Norse: [ˈhel]) is a female being in Norse mythology who is said to preside over an underworld realm of the same name, where she receives a portion of the dead.

Wikipedia

Keywords

FAQs

Package last updated on 29 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc