1. new-github-release-url
Generate a URL for opening a new GitHub release with prefilled tag, body, and other fields
new-github-release-url
Package: new-github-release-url
Created by: sindresorhus
Last modified: Sat, 15 Jul 2023 21:26:17 GMT
Version: 2.0.0
License: MIT
Downloads: 1,635,911
Repository: https://github.com/sindresorhus/new-github-release-url

Install

npm install new-github-release-url
yarn add new-github-release-url

new-github-release-url

Generate a URL for opening a new GitHub release with prefilled tag, body, and other fields

GitHub supports prefilling a new release by setting certain search parameters. This package simplifies generating such URL.

Install

 $ npm install new-github-release-url

Usage

 import newGithubReleaseUrl from 'new-github-release-url';
import open from 'open';

const url = newGithubReleaseUrl({
	user: 'sindresorhus',
	repo: 'new-github-release-url',
	body: '\n\n\n---\nI\'m a human. Please be nice.'
});
//=> 'https://github.com/sindresorhus/new-github-release-url/releases/new?body=%0A%0A%0A---%0AI%27m+a+human.+Please+be+nice.'

// Then open it
await open(url);

API

newGithubReleaseUrl(options)

Returns a URL string.

options

Type: object

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

Type: string

GitHub username or organization.

repo

Type: string

GitHub repo.

tag

Type: string

The tag name of the release.

target

Type: string
Default: The default branch

The branch name or commit SHA to point the release's tag at, if the tag doesn't already exist.

title

Type: string

The title of the release.

GitHub shows the tag name when not specified.

body

Type: string

The description text of the release.

isPrerelease

Type: boolean
Default: false

Whether the release should be marked as a pre-release.

  • new-github-issue-url - Generate a URL for opening a new GitHub issue with prefilled title, body, and other fields

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code