{"id":15042481,"url":"https://github.com/saadmk11/changelog-ci","last_synced_at":"2025-04-10T00:18:23.304Z","repository":{"id":42010856,"uuid":"292240176","full_name":"saadmk11/changelog-ci","owner":"saadmk11","description":"Changelog CI is a GitHub Action that enables a project to automatically generate changelogs","archived":false,"fork":false,"pushed_at":"2023-08-05T10:48:37.000Z","size":204,"stargazers_count":135,"open_issues_count":11,"forks_count":21,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T00:18:15.254Z","etag":null,"topics":["actions","bash-script","change-detection","changelog","changelog-ci","changelog-generator","ci","commit","continous-integration","continuous-integration","dockerfile","git","github","github-actions","github-api","hacktoberfest","pull-request","pull-requests","python","python-3"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/changelog-ci","language":"Python","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/saadmk11.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}},"created_at":"2020-09-02T09:34:45.000Z","updated_at":"2025-03-29T18:29:03.000Z","dependencies_parsed_at":"2023-02-08T06:31:30.869Z","dependency_job_id":null,"html_url":"https://github.com/saadmk11/changelog-ci","commit_stats":{"total_commits":234,"total_committers":5,"mean_commits":46.8,"dds":0.08119658119658124,"last_synced_commit":"94435ac02b50745a2543caf0c5d6eae23665615a"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadmk11%2Fchangelog-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadmk11%2Fchangelog-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadmk11%2Fchangelog-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadmk11%2Fchangelog-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saadmk11","download_url":"https://codeload.github.com/saadmk11/changelog-ci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131318,"owners_count":21052820,"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":["actions","bash-script","change-detection","changelog","changelog-ci","changelog-generator","ci","commit","continous-integration","continuous-integration","dockerfile","git","github","github-actions","github-api","hacktoberfest","pull-request","pull-requests","python","python-3"],"created_at":"2024-09-24T20:47:22.519Z","updated_at":"2025-04-10T00:18:23.281Z","avatar_url":"https://github.com/saadmk11.png","language":"Python","funding_links":[],"categories":["GitHub Actions"],"sub_categories":["Widgets \u0026 Embeds"],"readme":"![Changelog CI Banner](https://i.imgur.com/72lxPjs.png)\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/saadmk11/changelog-ci?style=flat-square)](https://github.com/saadmk11/changelog-ci/releases/latest)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/saadmk11/changelog-ci/Changelog%20CI?label=Changelog%20CI\u0026style=flat-square)\n[![GitHub](https://img.shields.io/github/license/saadmk11/changelog-ci?style=flat-square)](https://github.com/saadmk11/changelog-ci/blob/master/LICENSE)\n[![GitHub Marketplace](https://img.shields.io/badge/Get%20It-on%20Marketplace-orange?style=flat-square)](https://github.com/marketplace/actions/changelog-ci)\n[![GitHub stars](https://img.shields.io/github/stars/saadmk11/changelog-ci?color=success\u0026style=flat-square)](https://github.com/saadmk11/changelog-ci/stargazers)\n\n## What is Changelog CI?\n\nChangelog CI is a GitHub Action that enables a project to automatically generate changelogs.\n\nChangelog CI can be triggered on `pull_request`, `workflow_dispatch` and any other events that can provide the required inputs.\nLearn more about [events that trigger workflows](https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows)\n\nThe workflow can be configured to perform **any (or all)** of the following actions:\n\n* For `pull_request` event:\n  * **Generates** changelog using **Pull Request Titles** or **Commit Messages** made after the last release.\n  * **Prepends** the generated changelog to the `CHANGELOG.md`/`CHANGELOG.rst` file.\n  * Then **Commits** the modified `CHANGELOG.md`/`CHANGELOG.rst` file to the release pull request branch.\n  * Adds a **Comment** on the release pull request with the generated changelog.\n\n\n* For other events:\n  * **Generate** changelog using **Pull Request Title** or **Commit Messages** made after the last release.\n  * **Prepends** the generated changelog to the `CHANGELOG.md`/`CHANGELOG.rst` file.\n  * Then Creates a **Pull Request** with the `CHANGELOG.md`/`CHANGELOG.rst` file changes.\n\n## How Does It Work:\n\nChangelog CI uses `python` and `GitHub API` to generate changelog for a\nrepository. First, it tries to get the `latest release` from the repository (If\navailable). Then, it checks all the **pull requests** / **commits** merged after the last release\nusing the GitHub API. After that, it parses the data and generates\nthe `changelog`. It is able to use `Markdown` or `reStructuredText` to generate Changelog.\nFinally, It writes the generated changelog at the beginning of\nthe `CHANGELOG.md`/`CHANGELOG.rst` (or user-provided filename) file. In addition to that,\nif a user provides a configuration file (JSON/YAML), Changelog CI parses the user-provided configuration\nfile and renders the changelog according to users configuration. Then, if the workflow run was triggered\nby a `pull_request` event, the changes are **committed** and/or **commented** to the release Pull request,\notherwise a new **Pull Request** is created with the changes.\n\n## Usage:\n\n* To use this Action on a `pull_request` event, The pull **request title** must match with the\ndefault `pull_request_title_regex` or the user-provided `pull_request_title_regex` from the config file.\n\n* To use this Action on any other events, You must provide `release_version` as an input to the workflow.\nIt can be provided using `workflow_dispatch` events `input` option or from any other sources.\n\n**Basic Integration (for `pull_request` event):** To integrate `Changelog CI` on your repositories, Put\n`.github/workflows/changelog-ci.yml` file in your repository with the following content:\n\n```yaml\nname: Changelog CI\n\non:\n  pull_request:\n    types: [ opened ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n\n      - name: Run Changelog CI\n        uses: saadmk11/changelog-ci@v1.1.2\n```\n\n### Workflow input options\n\nThese are the inputs that can be provided on the workflow.\n\n| Name | Required | Description | Default |\n|------|----------|-------------|---------|\n| `changelog_filename` | No | Name of the changelog file (Any file name with `.md` or `.rst` extension) | `CHANGELOG.md` |\n| `config_file` | No | User configuration file path (configuration file can be in `JSON` or `YAML` format) | `null` |\n| `committer_username` | No | Name of the user who will commit the changes to GitHub | github-actions[bot] |\n| `committer_email` | No | Email Address of the user who will commit the changes to GitHub | github-actions[bot]@users.noreply.github.com |\n| `release_version` | No (Required if workflow run is not triggered by a `pull_request` event) | The release version that will be used on the generated Changelog | `null` |\n| `github_token` | No | `GITHUB_TOKEN` provided by the workflow run or Personal Access Token (PAT) | `github.token` |\n\n#### Workflow with All Options:\n\n```yaml\nname: Changelog CI\n\non:\n  pull_request:\n    types: [ opened ]\n\n  # Optionally you can use `workflow_dispatch` to run Changelog CI Manually\n  workflow_dispatch:\n    inputs:\n      release_version:\n        description: 'Set Release Version'\n        required: true\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      # Checks-out your repository\n      - uses: actions/checkout@v2\n\n      - name: Run Changelog CI\n        uses: saadmk11/changelog-ci@v1.1.2\n        with:\n          # Optional, you can provide any name for your changelog file,\n          # We currently support Markdown (.md) and reStructuredText (.rst) files\n          # defaults to `CHANGELOG.md` if not provided.\n          changelog_filename: CHANGELOG.rst\n          # Optional, only required when you want more customization\n          # e.g: group your changelog by labels with custom titles,\n          # different version prefix, pull request title and version number regex etc.\n          # config file can be in JSON or YAML format.\n          config_file: changelog-ci-config.json\n          # Optional, This will be used to configure git\n          # defaults to `github-actions[bot]` if not provided.\n          committer_username: 'test'\n          committer_email: 'test@test.com'\n          # Optional, only required when you want to run Changelog CI \n          # on an event other than `pull_request` event.\n          # In this example `release_version` is fetched from `workflow_dispatch` events input.\n          # You can use any other method to fetch the release version\n          # such as environment variable or from output of another action\n          release_version: ${{ github.event.inputs.release_version }}\n          # Optional\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n**Note:** To **Enable Commenting, Disable Committing, Group Changelog Items, Use Commit Messages** and\nsome other options, see [Configuration](#configuration) to learn more.\n\n**Changelog CI Badge:**\n\n```markdown\n![Changelog CI Status](https://github.com/\u003cusername\u003e/\u003crepository\u003e/workflows/Changelog%20CI/badge.svg)\n```\n\n![Changelog CI Status](https://github.com/saadmk11/changelog-ci/workflows/Changelog%20CI/badge.svg)\n\n#### Workflow Output:\n\nThe workflow outputs the changelog as a `GitHub Action Output`. The name of the output is `changelog`.\nThe output can be used in other steps of the action. For example:\n\n```yaml\n- name: changelog-ci\n  uses: saadmk11/changelog-ci@v1.1.2\n  id: changelog-ci\n\n- name: Get Changelog Output\n  run: |\n    echo \"${{ steps.changelog-ci.outputs.changelog }}\"\n    echo \"${{ steps.changelog-ci.outputs.changelog }}\" \u003e\u003e $GITHUB_STEP_SUMMARY\n```\n\nHere the output is used to write the generated changelog to the GitHub Actions Job Summary.\n\n## Configuration\n\n### Using an optional configuration file\n\nChangelog CI is will run perfectly fine without including a configuration file.\nIf a user seeks to modify the default behaviors of Changelog CI, they can do so\nby adding a `JSON` or `YAML` config file to the project. For example:\n\n* Including `JSON` file `changelog-ci-config.json`:\n\n    ```yaml\n    with:\n      config_file: changelog-ci-config.json\n    ```\n\n* Including `YAML` file `changelog-ci-config.yaml`:\n\n    ```yaml\n    with:\n      config_file: changelog-ci-config.yaml\n    ```\n\n### Configuration File options\n\nThese are the options that can be provided on the `config_file`.\n\n| Name                        | Required | Description                                                                                                                                                                                                                                                                       | Default                                      | Options                            |\n|-----------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|------------------------------------|\n| `changelog_type`            | No       | `pull_request` option will generate changelog using pull request title. `commit_message` option will generate changelog using commit messages.                                                                                                                                    | `pull_request`                               | `pull_request` or `commit_message` |\n| `header_prefix`             | No       | The prefix before the version number. e.g. `version:` in `Version: 1.0.2`                                                                                                                                                                                                         | `Version:`                                   |                                    |\n| `commit_changelog`          | No       | If it's set to `true` then Changelog CI will commit the changes to the release pull request. (A pull Request will be created with the changes if the workflow run is not triggered by a `pull_request` event)                                                                     | `true`                                       | `true` or `false`                  |\n| `comment_changelog`         | No       | If it's set to `true` then Changelog CI will comment the generated changelog on the release pull request. (Only applicable for workflow runs triggered by a `pull_request` event)                                                                                                 | `false`                                      | `true` or `false`                  |\n| `pull_request_title_regex`  | No       | If the pull request title matches with this `regex` Changelog CI will generate changelog for it. Otherwise, it will skip the changelog generation. (Only applicable for workflow runs triggered by a `pull_request` event)                                                        | `^(?i:release)`                              |                                    |\n| `version_regex`             | No       | This `regex` is used to find the version name/number (e.g. `1.0.2`, `v2.0.2`) from the pull request title. in case of no match, changelog generation will be skipped. (Only applicable for workflow runs triggered by a `pull_request` event)                                     | [`SemVer`](https://regex101.com/r/Qayx0q/1/) |                                    |\n| `group_config`              | No       | By adding this you can group changelog items by your repository labels with custom titles.                                                                                                                                                                                        | `null`                                       |                                    |\n| `include_unlabeled_changes` | No       | if set to `false` the generated changelog will not contain the Pull Requests that are unlabeled or the labels are not on the `group_config` option. This option will only be used if the `group_config` option is added and the `changelog_type` option is set to `pull_request`. | `true`                                       | `true` or `false`                  |\n| `unlabeled_group_title`     | No       | This option will set the title of the unlabeled changes. This option will only be used if the `include_unlabeled_changes` option is set to `true`, `group_config` option is added and the `changelog_type` option is set to `pull_request`.                                       | `Other Changes`                              |                                    |\n| `exclude_labels`            | No       | If the pull Request includes one of the labels in this option the changelog for that pull request will be ignored.                                                                                                                                                                | `null`                                       |                                    |\n\n#### Example Configuration File\n\nWritten in JSON:\n\n```json\n{\n  \"changelog_type\": \"commit_message\",\n  \"header_prefix\": \"Version:\",\n  \"commit_changelog\": true,\n  \"comment_changelog\": true,\n  \"include_unlabeled_changes\": true,\n  \"unlabeled_group_title\": \"Unlabeled Changes\",\n  \"pull_request_title_regex\": \"^Release\",\n  \"version_regex\": \"v?([0-9]{1,2})+[.]+([0-9]{1,2})+[.]+([0-9]{1,2})\\\\s\\\\(\\\\d{1,2}-\\\\d{1,2}-\\\\d{4}\\\\)\",\n  \"exclude_labels\": [\"bot\", \"dependabot\", \"ci\"],\n  \"group_config\": [\n    {\n      \"title\": \"Bug Fixes\",\n      \"labels\": [\"bug\", \"bugfix\"]\n    },\n    {\n      \"title\": \"Code Improvements\",\n      \"labels\": [\"improvements\", \"enhancement\"]\n    },\n    {\n      \"title\": \"New Features\",\n      \"labels\": [\"feature\"]\n    },\n    {\n      \"title\": \"Documentation Updates\",\n      \"labels\": [\"docs\", \"documentation\", \"doc\"]\n    }\n  ]\n}\n```\n\nWritten in YAML:\n\n```yaml\nchangelog_type: 'commit_message' # or 'pull_request'\nheader_prefix: 'Version:'\ncommit_changelog: true\ncomment_changelog: true\ninclude_unlabeled_changes: true\nunlabeled_group_title: 'Unlabeled Changes'\npull_request_title_regex: '^Release'\nversion_regex: 'v?([0-9]{1,2})+[.]+([0-9]{1,2})+[.]+([0-9]{1,2})\\s\\(\\d{1,2}-\\d{1,2}-\\d{4}\\)'\nexclude_labels:\n  - bot\n  - dependabot\n  - ci\ngroup_config:\n  - title: Bug Fixes\n    labels:\n      - bug\n      - bugfix\n  - title: Code Improvements\n    labels:\n      - improvements\n      - enhancement\n  - title: New Features\n    labels:\n      - feature\n  - title: Documentation Updates\n    labels:\n      - docs\n      - documentation\n      - doc\n```\n\n* In this Example **`version_regex`** matches any version number including date (\ne.g: **`v1.1.0 (01-23-2018)`**) in the pull request title. If you don't provide\nany `regex` Changelog CI will use default\n[`SemVer`](https://regex101.com/r/Qayx0q/1/) pattern. e.g. **`1.0.1`**\n, **`v1.0.2`**.\n\n* Here the changelog will be generated using commit messages because of `changelog_type: 'commit_message'`.\n\n* Here **`pull_request_title_regex`** will match any pull request title that starts with **`Release`**\nyou can match **Any Pull Request Title** by adding  this **`pull_request_title_regex\": \".*\"`**,\n\n**[See this example output with group_config](#example-changelog-output-using-config-file-pull-request)**\n\n**[See this example output without group_config](#example-changelog-output-without-using-config-file)**\n\n## Changelog CI in Action (Comment \u0026 Commit)\n![Changelog CI](https://user-images.githubusercontent.com/24854406/93024522-1844d180-f619-11ea-9c25-57b4e95b822b.gif)\n\n# Example Changelog Output using config file (Pull Request):\n\n## Version: v2.1.0 (02-25-2020)\n\n#### Bug Fixes\n\n* [#53](https://github.com/test/test/pull/57): Keep updating the readme\n* [#54](https://github.com/test/test/pull/56): Again updating the Same Readme file\n\n#### New Features\n\n* [#68](https://github.com/test/test/pull/68): Update README.md\n\n#### Documentation Updates\n\n* [#66](https://github.com/test/test/pull/66): Docs update\n\n\n## Version: v1.1.0 (01-01-2020)\n\n#### Bug Fixes\n\n* [#53](https://github.com/test/test/pull/57): Keep updating the readme\n* [#54](https://github.com/test/test/pull/56): Again updating the Same Readme file\n\n#### Documentation Updates\n\n* [#66](https://github.com/test/test/pull/66): Docs update\n\n# Example Changelog Output using config file (Commit Messages):\n\n## Version: v2.1.0 (02-25-2020)\n\n* [123456](https://github.com/test/test/commit/9bec2dbdsgfsdf8b4de11edb): Keep updating the readme\n* [123456](https://github.com/test/test/commit/9bec2dbdsgfsdf8b4de11edb): Again updating the Same Readme file\n* [123456](https://github.com/test/test/commit/9bec2dbdsgfsdf8b4de11edb): Update README.md\n* [123456](https://github.com/test/test/commit/9bec2dbdsgfsdf8b4de11edb): Docs update\n\n\n## Version: v1.1.0 (01-01-2020)\n\n* [123456](https://github.com/test/test/commit/9bec2dbdsgfsdf8b4de11edb): Keep updating the readme\n* [123456](https://github.com/test/test/commit/9bec2dbdsgfsdf8b4de11edb): Again updating the Same Readme file\n* [123456](https://github.com/test/test/commit/9bec2dbdsgfsdf8b4de11edb): Docs update\n\n# Example Changelog Output without using config file:\n\n## Version: 0.0.2\n\n* [#53](https://github.com/test/test/pull/57): Keep updating the readme\n* [#54](https://github.com/test/test/pull/56): Again updating the Same Readme file\n* [#55](https://github.com/test/test/pull/55): README update\n\n\n## Version: 0.0.1\n\n* [#43](https://github.com/test/test/pull/43): It feels like testing never ends\n* [#35](https://github.com/test/test/pull/35): Testing again and again\n* [#44](https://github.com/test/test/pull/44): This is again another test, getting tired\n* [#37](https://github.com/test/test/pull/37): This is again another test\n\n\n# License\n\nThe code in this project is released under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadmk11%2Fchangelog-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaadmk11%2Fchangelog-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadmk11%2Fchangelog-ci/lists"}