2.0.0 • Published 2 years ago

new-github-release-url v2.0.0

Weekly downloads
23,558
License
MIT
Repository
github
Last release
2 years ago

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.

Related

  • new-github-issue-url - Generate a URL for opening a new GitHub issue with prefilled title, body, and other fields
commit-cz-fixeasy-select-rnreact-native-covid-sdkreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutils@oiti/documentoscopy-react-nativequoc-testluminos-ui-core@everything-registry/sub-chunk-2263jawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgreact-native-jawwy_samplelionphong1-utilskhaled-salem-custom-componentskonfig-release-itjordy-frijters-test-libjrennsoh88-react-native-scroll-indicatornative-date-picker-modulenative-modal-damage-vehiclenew-awesome-4321mama-exporternpnpm_qwertynpnbnpm_one_12_34_1_npm_one_1_2_3npm_one_2_2@valifysolutions/react-native-vidvliveness@react-native-ui-design/button@release-git/release-git@thinxviewx/core-rn@sephriot/react-native-persistable-uri@qoopido/lerna.version@sidghimire/react-native-mapbox-navigation@status-im/react-native-transparent-video@stepsec/release@saad27/react-native-bottom-tab-tour@taingo97/react-native-awesome-module@taingo97/react-native-bluetooth-xprinter@taingo97/react-native-expo-key-rsa-kt@taingo97/react-native-expo-rsa@taingo97/react-native-generate-key-rsa@taingo97/react-native-key-rsa@taingo97/react-native-print-xprinter@taingo97/react-native-rsa@taingo97/react-native-rsa-expo@taingo97/react-native-sunmi-printer@taingo97/react-native-telpo-printer@types/new-github-release-url@wecraftapps/react-native-use-keyboardagent-get-agent@amirdiafi/react-native-ios-haptics@amiruldev/wajsawesome-module-kdbiometric-st@akhilome/np@ali5049/react-native-buttons@azalpacir/react-native-dhp-printer@aysea/react-native-ui-library@con-test/react-native-concent-common@cs6/react-native-test-native-view-library@damruravihara/react-native-testing-package@blusalt-sdk/react-native-blusalt-document-verification@brantalikp/rn-resize@geut/chanjawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwy@bee-icons/qwikfluent.adflow.reactnativesdkfluent.adflow.reactnativesdk-alphagaurav-react-native-loopgriffin-ui-libraryfawaterak-online-paymentfawatrak-online-paymentframework_test_library_sixdeeframework_test_library_sixdee_newframework_test_library_sixdee_new_newgenz-native-elementsexpo-renavigatefmslgamification-integration-newnp-emekaraact-native-arunramya151project-wajs-dvpkp-plugin-clireac-native-arun-ramya-testreact-native-app-bubblereact-native-app-integrity-checksumreact-native-azure-communication-servicesreact-native-basic-appreact-native-basic-screenreact-native-biometric-authenticate
2.0.0

2 years ago

1.0.0

5 years ago

0.1.0

5 years ago