{"id":27217803,"url":"https://github.com/ext/pull-request-changelog","last_synced_at":"2026-03-06T02:21:10.446Z","repository":{"id":287087630,"uuid":"963409963","full_name":"ext/pull-request-changelog","owner":"ext","description":"Generate changelog from conventional changelog for using in a pull request comment","archived":false,"fork":false,"pushed_at":"2025-04-09T22:31:30.000Z","size":2,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T22:36:55.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/ext.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2025-04-09T16:31:26.000Z","updated_at":"2025-04-09T22:31:32.000Z","dependencies_parsed_at":"2025-04-09T22:37:06.845Z","dependency_job_id":"34096e53-c10b-49e8-af7a-6b4dd76cdd98","html_url":"https://github.com/ext/pull-request-changelog","commit_stats":null,"previous_names":["ext/pull-request-changelog"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ext%2Fpull-request-changelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ext%2Fpull-request-changelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ext%2Fpull-request-changelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ext%2Fpull-request-changelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ext","download_url":"https://codeload.github.com/ext/pull-request-changelog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248163043,"owners_count":21057863,"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","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":[],"created_at":"2025-04-10T05:31:27.754Z","updated_at":"2025-10-16T18:40:27.769Z","avatar_url":"https://github.com/ext.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pull-request-changelog\n\nAdd a sticky comment to a pull request with the changelog entries for the new commits.\n\nFeatures:\n\n- [Github action](https://github.com/marketplace/actions/pull-requst-changelog) for easy integration with Github.\n- CLI and API for custom usage.\n- Supports both Conventional Changelog presets or a custom configuration.\n- Works with Semantic Release\n\n![example comment](example-comment.png)\n\n## Usage with Github Actions (recommended)\n\nCreate a workflow with these steps:\n\n```yaml\non:\n  pull_request:\n\npermissions:\n  pull-requests: write\n\njobs:\n  pr-changelog:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          ref: \"${{ github.head_ref }}\"\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 22.x\n      - run: npm ci\n      - name: Pull Requst Changelog\n        uses: ext/pull-request-changelog@v1\n        with:\n          preset: conventional-changelog-conventionalcommits\n```\n\n\u003e [!NOTE]\n\u003e Node 22.x or later is required, make sure to specify `node-version`!\n\nIf you want to only run for pull requests targeting certain branches add:\n\n```diff\n on:\n   pull_request:\n+    branches:\n+      - main\n```\n\n### Configuration\n\nThe following input parameters are provided, which can be passed to the `with` parameter.\nAll parameters are optional.\n\n\u003c!-- ACTION INPUTS BEGIN --\u003e\n\n\u003c!-- prettier-ignore --\u003e\nInput\u0026nbsp;parameter | Default | Description\n--- | --- | ---\npreset |  | full name of an NPM package with a conventional changelog preset\nconfig |  | path to a configuration file exporting a configuration\ntemplate-dir |  | directory with templates\nfilename | \"pr-changelog.md\" | name of temporary file generated by script\ncomment | true | If `true` a sticky comment will be added with the changelog.\ncomment-id | \"pull-request-changelog\" | id passed to sticky-pull-request-commend\nfetch-depth | 100 | git commit depth\nversion | \"auto\" | NPM script version (passed to npx). Default is to use same script version as action version.\nskip-install |  | Skip installing NPM package (you need to manually ensure the package exists)\n\n\u003c!-- ACTION INPUTS END --\u003e\n\n## Usage with CLI\n\n```bash\nnpx pull-request-changelog \\\n  --preset conventional-changelog-conventionalcommits \\\n  --from origin/main \\\n  --to HEAD\n```\n\nDo note that the full name of the preset must be specified, this is different to how `conventional-changelog-cli` handles `-p`.\n\n\u003c!-- CLI USAGE BEGIN --\u003e\n\n```plaintext\nGenerate changelog from conventional changelog for using in a pull request comment.\n\nUsage\n  $ npx pull-request-changelog -f origin/main\n\nOptions\n  --from, -f          Base branch/ref\n  --to, -t            Pull request branch/ref (default: HEAD)\n  --preset, -p        Conventional Changelog preset (NPM package)\n  --config, -c        Conventional Changelog config (filename)\n  --output, -o        Output file (default stdout)\n  --template-dir, -T  Template directory\n\nOther\n  --help      Show usage\n  --version   Show version\n\nThe template directory may contain the files:\n\n- message.hbs for the main template\n- header.hbs for the header partial\n- footer.hbs for the footer partial\n```\n\n\u003c!-- CLI USAGE END --\u003e\n\nIf you need to customize the configuration for the conventional-changelog preset create a new file default exporting a function wrapping the preset and use `--config` instead:\n\n```ts\nimport conventionalChangelogConventionalcommits from \"conventionallchangelog-conventionalcommits\";\n\nexport default () =\u003e {\n  return conventionalChangelogConventionalcommits({\n    /* preset configuration */\n  });\n};\n```\n\n```diff\n npx pull-request-changelog \\\n-  --preset conventional-changelog-conventionalcommits \\\n+  --config my-config.mjs \\\n   --from origin/main \\\n   --to HEAD\n```\n\n## Usage with API\n\n```ts\nimport { pullRequestChangelog } from \"pull-request-changelog\";\nimport conventionalChangelogConventionalcommits from \"conventionallchangelog-conventionalcommits\";\n\nconst markdown = await pullRequestChangelog({\n  config: conventionalChangelogConventionalcommits({\n    /* preset configuration */\n  }),\n  git: {\n    from: \"origin/main\",\n    to: \"HEAD\",\n  },\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fext%2Fpull-request-changelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fext%2Fpull-request-changelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fext%2Fpull-request-changelog/lists"}