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-reactjrennsoh88-react-native-scroll-indicatorjesh-calculationjnf-accesscontrol-rnttljordy-frijters-test-libkhaled-salem-custom-componentshong1-utilslionpmama-exporterkonfig-release-it@wecraftapps/react-native-use-keyboard@types/new-github-release-url@tlgeo/react-native-gdal@thinxviewx/core-rn@zotasys/nativeagent-get-agentawesome-module-kdarchlibraryjawwy_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_libyangtao-jsyarn-react-hook-formzf-np@labiebhn_/react-native-multiplier@kylemh/np@lehuyaa/my-assets@lerna-lite/versionnative-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-odpreact-native-custom-image-carouselreact-native-custom-poccomponentreact-native-custom-poccomponent-nextreact-native-dff-components-demoreact-native-dhp-printerreact-native-dimensions-layoutreact-native-check-componentreact-native-create-video-thumbnailreact-native-conekta-card-tokenizerreact-native-components-designreact-native-cplusreact-native-custome-component-demoreact-native-escapereact-native-module-argereact-native-line-login-androidreact-native-innity-2react-native-innity-remasterreact-native-input-libraryreact-native-nativewindreact-native-ideo-rn-notificationsreact-native-ghn-ekycreact-native-get-countriesreact-native-fedlight-dsmscout-chatbot-widget
2.0.0

4 years ago

1.0.0

7 years ago

0.1.0

7 years ago