{"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":{"integrity":"sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ==","shasum":"335189b91f52bbb9569042a7485900a205a0500b","tarball":"http://registry-npm.ywwl.com/new-github-release-url/download/new-github-release-url-2.0.0.tgz","fileCount":5,"unpackedSize":6174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh20ZyCRA9TVsSAnZWagAA05cP/RLCkW3XRWVMS274ddTC\nF90mSJpsfHq9dOY5tC6EubjuezAeYbVaVHfV6ARZ2srtI84MyCcKssCgbCDw\nEwiOUnKiDnST8dysAyaMzfB9b8dp+H2h+ivnSJqYOijYuoy+AJjNGYoK/9Pr\nAm5PSmt9gRIb0hSUJ78T9KMQ+vRtcJ2xyDRItHkeuSOyPBBUTF55pChU2cA5\n6U8zrQ0bazSiRLRyj2hbk9f+XFdO7OvkPMzIhnce5Kqb9STzcnZNZA0QcPFR\nVImaEjeVXt5/pvYD88HYrci+Z+p7S1EQwdU4vdmi+ywpMQ7pWgPIrs0zM1yY\nKdxMO4WQ8MAYpoi/X+DOyT1y5EED9UrwVhJr9KtLP5bsP3sKHgBdHNPHzLjH\nrvYsdbl671jm4FQKHrMsY4DhYpb5Qx5mQ5fve8hOVzyMwS4Tfdyf4Qb5nsKE\nNaucfKYqZnSFcVRC21dzDQw5immvvL54V+UjPioUCLyAMFGt/BCCpDglG1hc\ntWRajD5zKKmuuCBp1XApP3KFHHEY41gaVPNSixcPUo5HoObO7JlCGxk1Cwzc\n3Pwov1VeisXTg9Rc37g7R930+/h8nqbJJPPbnRzIiLeiLdLg7L8EikY8Jh1G\nMaJ5nfQvt+dMYvo+DQdf4tZbMt6WLpwlNYSBFxa7mRMQr5F+3xg147fOgfId\n4x8X\r\n=MDDn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGIPLkOYjsdkN/EsRjTVP/dIVNc8ccRJVFMoK78ZmGpxAiBtAaGsFu/OPJDCrRI9H8UAGqJc0lja/TfyMR07v5dmAg=="}],"size":2487,"noattachment":false,"key":"/new-github-release-url/-/new-github-release-url-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/new-github-release-url_2.0.0_1634572204942_0.9485056214264695"},"_hasShrinkwrap":false,"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","publish_time":1634572205060,"_cnpm_publish_time":1634572205060,"dist-tags":{"latest":"2.0.0"}}