New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

new-github-issue-url

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

new-github-issue-url - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

11

index.js
'use strict';
module.exports = (options = {}) => {
if (!(options.user && options.repo)) {
throw new Error('The `user` and `repo` options are required');
let repoUrl = 'https://github.com/';
if (options.repoUrl) {
repoUrl += options.repoUrl;
} else if (options.user && options.repo) {
repoUrl += `${options.user}/${options.repo}`;
} else {
throw new Error('You need to specify either the `repoUrl` option or both the `user` and `repo` options');
}
const url = new URL(`https://github.com/${options.user}/${options.repo}/issues/new`);
const url = new URL(`${repoUrl}/issues/new`);

@@ -10,0 +15,0 @@ const types = [

{
"name": "new-github-issue-url",
"version": "0.1.0",
"version": "0.1.1",
"description": "Generate a URL for opening a new GitHub issue with prefilled title, body, and other fields",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -53,5 +53,12 @@ # new-github-issue-url [![Build Status](https://travis-ci.com/sindresorhus/new-github-issue-url.svg?branch=master)](https://travis-ci.com/sindresorhus/new-github-issue-url)

You are required to either specify the `repoUrl` option or both the `user` and `repo` options.
##### repoUrl
Type: `string`
The full URL to the repo.
##### user
*Required*<br>
Type: `string`

@@ -63,3 +70,2 @@

*Required*<br>
Type: `string`

@@ -66,0 +72,0 @@

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