{"_id":"new-github-release-url","_rev":"1278232","name":"new-github-release-url","description":"Generate a URL for opening a new GitHub release with prefilled tag, body, and other fields","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-10-18T15:55:59.000Z","created":"2018-12-02T16:35:52.810Z","2.0.0":"2021-10-18T15:50:05.060Z","1.0.0":"2019-04-23T08:07:13.307Z","0.1.0":"2018-12-02T16:35:52.810Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/new-github-release-url.git"},"versions":{"2.0.0":{"name":"new-github-release-url","version":"2.0.0","description":"Generate a URL for opening a new GitHub release with prefilled tag, body, and other fields","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/new-github-release-url.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd","start":"node example.js"},"keywords":["github","release","releases","new","generate","url","gh","query","search","parameters","params"],"dependencies":{"type-fest":"^2.5.1"},"devDependencies":{"ava":"^3.15.0","open":"^8.3.0","tsd":"^0.18.0","xo":"^0.45.0"},"gitHead":"2c153c5ddb67f4a5493cf944e2660c48ab9c2cda","bugs":{"url":"https://github.com/sindresorhus/new-github-release-url/issues"},"homepage":"https://github.com/sindresorhus/new-github-release-url#readme","_id":"new-github-release-url@2.0.0","_nodeVersion":"16.10.0","_npmVersion":"7.20.3","dist":{"shasum":"335189b91f52bbb9569042a7485900a205a0500b","size":2487,"noattachment":false,"key":"/new-github-release-url/-/new-github-release-url-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/new-github-release-url/download/new-github-release-url-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/new-github-release-url_2.0.0_1634572204942_0.9485056214264695"},"_hasShrinkwrap":false,"publish_time":1634572205060,"_cnpm_publish_time":1634572205060},"1.0.0":{"name":"new-github-release-url","version":"1.0.0","description":"Generate a URL for opening a new GitHub release with prefilled tag, body, and other fields","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/new-github-release-url.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd","start":"node example.js"},"keywords":["github","release","releases","new","generate","url","gh","query","search","parameters","params"],"dependencies":{"type-fest":"^0.4.1"},"devDependencies":{"ava":"^1.4.1","open":"^6.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"e8bb403bdd45520d8d8eab0a0cc0d8ac05dd891a","bugs":{"url":"https://github.com/sindresorhus/new-github-release-url/issues"},"homepage":"https://github.com/sindresorhus/new-github-release-url#readme","_id":"new-github-release-url@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"493847e6fecce39c247e9d89929be773d2e7f777","size":2566,"noattachment":false,"key":"/new-github-release-url/-/new-github-release-url-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/new-github-release-url/download/new-github-release-url-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/new-github-release-url_1.0.0_1556006833182_0.27107289810621094"},"_hasShrinkwrap":false,"publish_time":1556006833307,"_cnpm_publish_time":1556006833307},"0.1.0":{"name":"new-github-release-url","version":"0.1.0","description":"Generate a URL for opening a new GitHub release with prefilled tag, body, and other fields","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/new-github-release-url.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava","start":"node example.js"},"keywords":["github","release","releases","new","generate","url","gh","query","search","parameters","params"],"devDependencies":{"ava":"^0.25.0","opn":"^5.4.0","xo":"^0.23.0"},"gitHead":"986ae4becf3c3e3c8fe241417d018c664379b61c","bugs":{"url":"https://github.com/sindresorhus/new-github-release-url/issues"},"homepage":"https://github.com/sindresorhus/new-github-release-url#readme","_id":"new-github-release-url@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"942bba0ce45ac69ff6879a0b4261f1979dfc6e95","size":2215,"noattachment":false,"key":"/new-github-release-url/-/new-github-release-url-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/new-github-release-url/download/new-github-release-url-0.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/new-github-release-url_0.1.0_1543768552702_0.9680940419980135"},"_hasShrinkwrap":false,"publish_time":1543768552810,"_cnpm_publish_time":1543768552810}},"readme":"# new-github-release-url\n\n> Generate a URL for opening a new GitHub release with prefilled tag, body, and other fields\n\nGitHub supports prefilling a new release by setting [certain search parameters](https://github.com/isaacs/github/issues/1410#issuecomment-442240267). This package simplifies generating such URL.\n\n## Install\n\n```sh\n$ npm install new-github-release-url\n```\n\n## Usage\n\n```js\nimport newGithubReleaseUrl from 'new-github-release-url';\nimport open from 'open';\n\nconst url = newGithubReleaseUrl({\n\tuser: 'sindresorhus',\n\trepo: 'new-github-release-url',\n\tbody: '\\n\\n\\n---\\nI\\'m a human. Please be nice.'\n});\n//=> 'https://github.com/sindresorhus/new-github-release-url/releases/new?body=%0A%0A%0A---%0AI%27m+a+human.+Please+be+nice.'\n\n// Then open it\nawait open(url);\n```\n\n## API\n\n### newGithubReleaseUrl(options)\n\nReturns a URL string.\n\n#### options\n\nType: `object`\n\nYou are required to either specify the `repoUrl` option or both the `user` and `repo` options.\n\n##### repoUrl\n\nType: `string`\n\nThe full URL to the repo.\n\n##### user\n\nType: `string`\n\nGitHub username or organization.\n\n##### repo\n\nType: `string`\n\nGitHub repo.\n\n##### tag\n\nType: `string`\n\nThe tag name of the release.\n\n##### target\n\nType: `string`\\\nDefault: The default branch\n\nThe branch name or commit SHA to point the release's tag at, if the tag doesn't already exist.\n\n##### title\n\nType: `string`\n\nThe title of the release.\n\nGitHub shows the `tag` name when not specified.\n\n##### body\n\nType: `string`\n\nThe description text of the release.\n\n##### isPrerelease\n\nType: `boolean`\\\nDefault: `false`\n\nWhether the release should be marked as a pre-release.\n\n## Related\n\n- [new-github-issue-url](https://github.com/sindresorhus/new-github-issue-url) - Generate a URL for opening a new GitHub issue with prefilled title, body, and other fields\n","_attachments":{},"homepage":"https://github.com/sindresorhus/new-github-release-url#readme","bugs":{"url":"https://github.com/sindresorhus/new-github-release-url/issues"},"license":"MIT"}