{"id":15436629,"url":"https://github.com/xiphe/decorate-gh-pr","last_synced_at":"2026-02-19T01:31:49.867Z","repository":{"id":38175132,"uuid":"236707293","full_name":"Xiphe/decorate-gh-pr","owner":"Xiphe","description":"utility to add updatable comments to github pull requests","archived":false,"fork":false,"pushed_at":"2024-07-01T11:14:12.000Z","size":1483,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-26T07:42:49.985Z","etag":null,"topics":["automation","comments","github","preview-releases","pull-requests","semantic-release"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xiphe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-01-28T10:16:27.000Z","updated_at":"2021-11-16T21:39:55.000Z","dependencies_parsed_at":"2023-02-08T11:16:27.312Z","dependency_job_id":"be0037c1-e52a-40b0-b268-0a945ad77252","html_url":"https://github.com/Xiphe/decorate-gh-pr","commit_stats":{"total_commits":59,"total_committers":2,"mean_commits":29.5,"dds":"0.38983050847457623","last_synced_commit":"33d349f0efd8e97d43dc53a989a5d48d6709643f"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/Xiphe/decorate-gh-pr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xiphe%2Fdecorate-gh-pr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xiphe%2Fdecorate-gh-pr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xiphe%2Fdecorate-gh-pr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xiphe%2Fdecorate-gh-pr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xiphe","download_url":"https://codeload.github.com/Xiphe/decorate-gh-pr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xiphe%2Fdecorate-gh-pr/sbom","scorecard":{"id":153440,"data":{"date":"2025-08-11","repo":{"name":"github.com/Xiphe/decorate-gh-pr","commit":"df8956b817be7c0394dc6cb15f9ef488f5412ba1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T11:13:25.135Z","repository_id":38175132,"created_at":"2025-08-16T11:13:25.135Z","updated_at":"2025-08-16T11:13:25.135Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018310,"owners_count":26086342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","comments","github","preview-releases","pull-requests","semantic-release"],"created_at":"2024-10-01T18:51:59.890Z","updated_at":"2025-10-14T08:33:19.752Z","avatar_url":"https://github.com/Xiphe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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) =\u003e {\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 \u003c%= version %\u003e on \u003c% print(date.toISOString()) %\u003e'\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 \u0026 { format: (format: string) =\u003e string };\n};\n```\n\n## License\n\n\u003e The MIT License\n\u003e\n\u003e Copyright (C) 2021 Hannes Diercks\n\u003e\n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy of\n\u003e this software and associated documentation files (the \"Software\"), to deal in\n\u003e the Software without restriction, including without limitation the rights to\n\u003e use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n\u003e of the Software, and to permit persons to whom the Software is furnished to do\n\u003e so, subject to the following conditions:\n\u003e\n\u003e The above copyright notice and this permission notice shall be included in all\n\u003e copies or substantial portions of the Software.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\u003e IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n\u003e FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n\u003e COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n\u003e IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n\u003e CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiphe%2Fdecorate-gh-pr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiphe%2Fdecorate-gh-pr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiphe%2Fdecorate-gh-pr/lists"}