{"bin":{"decorate-gh-pr":"cli.js"},"bugs":{"url":"https://github.com/Xiphe/decorate-gh-pr/issues"},"dist":{"shasum":"96fadcbec22b4fde729ab6f4760494771bdfd20d","tarball":"https://registry.npmjs.org/decorate-gh-pr/-/decorate-gh-pr-1.4.0-add-date-format-helper.1659556300933.tgz","fileCount":11,"integrity":"sha512-8bhMpxCPREkO4NfV8useWvdraO5TBNUj1UACpMwCRxzbut/CRIQElowxGKXt0N+DdETSQwDc72nYIOkYfE0wDA==","signatures":[{"sig":"MEUCIQClK445hU8IZztJMc7qvw2y2k0ukCwv7ttpXhqqGVkAygIgRIOLgX3PcDEBlmqhIkaFSXQPk3ocMmuwvqdQpuxpapY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6tHOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSnQ/+OYtf7wGNpU3CKRmSep5aIscSZM6IvxUrcQw6sZ91dhDb6Md1\r\nEpPo3uiVTBjY2t1CQ/6lig8q0U5pvpby9zZBhUfhrzX3wM3U+d2zx1eYsTIk\r\n3gVai8O3tkH4fFkYqcLrqJOFfS0ER/v2gf50WQSONGXnwFkRttZLJbbfjcL1\r\nXZAts5xZ6N2Y5eUkf0TqaUzJQLW4ud+T1Xhyv7orKTzsSnC7YN/Kq6uxjkiD\r\nwvlSHmz7hqAtsGyyDCZAJW1TbWdBBHF7qkfKgXPth2kuZUxCl6VJekbWBp8P\r\nbuuOlf5hBO0J7TlY1YpXXOSiWEh199+tyUmSEucrRN9uH37V/OTK20R21N7c\r\nxkrBe6vc5X50RIv966CUWCI9eITs/lFYiADrCrGTOvFXrLAqHHv8JBxRVfIK\r\nlK5Dj0Am548j+ODtAXK8P5/AThIihwc9/C8R3bOR+zMD8j7sn4mLMGAmQEVu\r\nMCwSYqy4NAGQCRWsenVaij/HuleX4PumzuUuidmUlGxwkeYtZUWRODYDe8Zi\r\nVLWT2t9zt9NviHMbpfFXCm7yFF/hHREaSrQ0zHpz54XuiDiESav3mF8OX6PB\r\n8CjA9HE9C5eOpHs5PYfMUR/is4aYpg7zJ4rQ0LRIyh/9kb4l7pjVh6zpQrvk\r\n1bMwtPlRm63BXsaV2wzuFhFWvsAYpVS35nM=\r\n=9h5O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","name":"decorate-gh-pr","author":{"url":"https://xiphe.net/","name":"Hannes Diercks","email":"node@xiphe.net"},"readme":"# decorate-gh-pr\n\n[![CircleCI Status](https://circleci.com/gh/Xiphe/decorate-gh-pr/tree/main.svg?style=shield)](https://app.circleci.com/pipelines/github/Xiphe/decorate-gh-pr?branch=main)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![semantish-prerelease](https://img.shields.io/badge/%F0%9F%93%A6%F0%9F%9B%B8-semantish--prerelease-d86b86.svg)](https://github.com/Xiphe/semantish-prerelease)\n\nappend updatable text to the description of a pull request on GitHub.\n\n## Usage\n\nAll usages require a `GITHUB_TOKEN` or `GH_TOKEN` environment variable with write access to the PR.\n\nWhen invoked multiple times with same `id` the previous text will be overwritten.\n\n### CLI\n\n`npx decorate-gh-pr -h`\n\n```bash\ndecorate-gh-pr [flags]\n\ndecorate a GitHub Pull request\n\nOptions:\n\n  -f, --file     JavaScript file producing a Promise resolving to comment\n  -c, --comment  The comment\n  -r, --prepend  (Optional) Prepend new comments to the PR body\n                 Default: false - comment is appended at the end\n  -m, --compact  (Optional) Minimize added new-lines and whitespace\n                 Default: false - new comments are added in a new line\n  -i, --id       (Optional) Custom Identifier for the comment\n                 Default: \"decorate-gh-pr\"\n  -p, --pr       (Optional) PR identifier. Example: Xiphe/decorate-gh-pr#1\n                 Default: CI environment from env-ci package\n  -h, --help     Print this message\n```\n\n### Lib\n\n`npm install decorate-gh-pr`\n\n```js\nconst decorateGhPr = require(' decorate-gh-pr');\nconst envCi = require('env-ci');\n\ndecorateGhPr({\n  comment: 'Hello PR',\n  /* OPTIONAL: */\n  id: 'decorate-gh-pr',\n  prepend: false,\n  env: envCi(),\n  compact: false,\n}).catch((err) => {\n  /* handle error */\n});\n```\n\n### With semantic-release\n\n`npm install decorate-gh-pr`\n\n```js\n// release.config.js\nmodule.exports = {\n  plugins: [\n    [\n      \"decorate-gh-pr/on-release\",\n      {\n        /* uses https://lodash.com/docs/4.17.15#template */\n        comment: 'Hello <%= version %> on <% print(date.toISOString()) %>'\n        /* OPTIONAL: */\n        compact: false,\n        prepend: false,\n        id: 'decorate-gh-pr',\n      }\n    ],\n  ]\n};\n```\n\n`comment` can either be a string, or function. `CommentProps` are available as\nvariables in lodash template string or passed as argument.\n\n```ts\ntype CommentProps = {\n  name: string;\n  type: string;\n  version: string;\n  gitHead: string;\n  gitTag: string;\n  channel?: string;\n  /* Normal Date Object with argumented format() method from \n     https://www.npmjs.com/package/date-and-time */\n  date: Date & { format: (format: string) => string };\n};\n```\n\n## License\n\n> The MIT License\n>\n> Copyright (C) 2021 Hannes Diercks\n>\n> Permission is hereby granted, free of charge, to any person obtaining a copy of\n> this software and associated documentation files (the \"Software\"), to deal in\n> the Software without restriction, including without limitation the rights to\n> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n> of the Software, and to permit persons to whom the Software is furnished to do\n> so, subject to the following conditions:\n>\n> The above copyright notice and this permission notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","gitHead":"b9311360c3c851661415fae1fa6a5f9a5a96ba59","license":"MIT","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"xiphe","email":"npm@xiphe.net"},"homepage":"https://github.com/Xiphe/decorate-gh-pr#readme","keywords":["github","pull-request","update","notify","decorate","comment"],"repository":{"url":"git+https://github.com/Xiphe/decorate-gh-pr.git","type":"git"},"_npmVersion":"8.15.1","description":"utility to add updatable comments to github pull requests","directories":{},"maintainers":[{"name":"xiphe","email":"npm@xiphe.net"}],"_nodeVersion":"16.13.1","dependencies":{"env-ci":"7.3.0","minimist":"1.2.6","@octokit/rest":"19.0.3","date-and-time":"2.4.1","lodash.template":"4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"8.21.0","prettier":"2.7.1","semantic-release":"19.0.3","eslint-plugin-import":"2.26.0","semantish-prerelease":"4.0.0","eslint-config-prettier":"8.5.0","eslint-plugin-prettier":"4.2.1","eslint-config-airbnb-base":"15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/decorate-gh-pr_1.4.0-add-date-format-helper.1659556300933_1659556301905_0.17765367846950197","host":"s3://npm-registry-packages"},"_id":"decorate-gh-pr@1.4.0-add-date-format-helper.1659556300933","version":"1.4.0-add-date-format-helper.1659556300933"}