2.0.0 • Published 4 years ago

new-github-release-url v2.0.0

Weekly downloads
23,558
License
MIT
Repository
github
Last release
4 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_samplegriffin-ui-librarytest-library-123test-haptik-libwifi_configuration_packagetest-zeo-collectvision-camera-plugin-face-detectorvision-camera-plugin-scan-facesvision-camera-base64-resizedvantiq-react@cs6/react-native-test-native-view-library@con-test/react-native-concent-common@damruravihara/react-native-testing-package@praella/localisationistjrennsoh88-react-native-scroll-indicatorjesh-calculationjnf-accesscontrol-rnttljordy-frijters-test-libkhaled-salem-custom-componentsjawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwytest_lib_module_aarquickcapture_react_nativern-agora-ios-m@corenode/cli@nodecorejs/clireact-native-omental-frameworkreact-native-sixdee_test_lib@amiruldev/wajs@amirdiafi/react-native-ios-haptics@aviinash_jha/react-native-test_multiply@ali5049/react-native-buttons@akhilome/np@bee-icons/qwik@aysea/react-native-ui-library@brantalikp/rn-resize@adatechnology/react-native-android-getnet-pos@adembacaj/react-native-google-pay@_nomtek/react-native-shimmer-animation@azalpacir/react-native-dhp-printeryangtao-jsyarn-react-hook-formzf-np@ianwalter/release@idas1/ui-component-lib@eljs/release@geut/chan@labiebhn_/react-native-multiplier@kylemh/np@lehuyaa/my-assets@lerna-lite/version@navabi/react-native-ssl-pinning@enkeledi/react-native-week-month-date-picker@extrieve_technologies/quickcapture_react_native@kgit/readability@jfilipe-sparta/react-native-module_2@oiti/rn-liveness2d@react-native-ui-design/button@qoopido/lerna.version@saad27/react-native-bottom-tab-tour@ponchodien/react-native-printer-imin@pika/publish@npm_fluentco/adflow-react-native-sdk@sidghimire/react-native-mapbox-navigation@release-git/release-git@sephriot/react-native-persistable-uri@sridharetikala/react-native-rn-lib-custom-componentsnative-date-picker-modulenative-modal-damage-vehicleori-bot-react-nativenpm_qwertynpm_one_12_34_1_npm_one_1_2_3npm_one_2_2npnbpayutestingreact-native-auth-service-clientreact-native-android-video-player-viewreact-native-android-viewreact-native-bluetooth-device-detectreact-native-dummy-viewreact-native-ctp-odp
2.0.0

4 years ago

1.0.0

6 years ago

0.1.0

7 years ago