{"id":18026567,"url":"https://github.com/bobvanderlinden/semantic-release-pull-request-analyzer","last_synced_at":"2025-03-27T01:31:17.572Z","repository":{"id":230259628,"uuid":"778882564","full_name":"bobvanderlinden/semantic-release-pull-request-analyzer","owner":"bobvanderlinden","description":"A plugin for semantic-release that analyzes GitHub pull request labels","archived":false,"fork":false,"pushed_at":"2024-07-24T14:59:46.000Z","size":97,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T21:06:42.387Z","etag":null,"topics":["github","semantic-release","semantic-release-plugin"],"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/bobvanderlinden.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}},"created_at":"2024-03-28T15:41:13.000Z","updated_at":"2024-11-11T19:44:43.000Z","dependencies_parsed_at":"2024-03-28T18:28:26.254Z","dependency_job_id":"2ef940af-392d-4e65-9b5b-99d0053626b6","html_url":"https://github.com/bobvanderlinden/semantic-release-pull-request-analyzer","commit_stats":null,"previous_names":["bobvanderlinden/semantic-release-pull-request-analyzer"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobvanderlinden%2Fsemantic-release-pull-request-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobvanderlinden%2Fsemantic-release-pull-request-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobvanderlinden%2Fsemantic-release-pull-request-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobvanderlinden%2Fsemantic-release-pull-request-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bobvanderlinden","download_url":"https://codeload.github.com/bobvanderlinden/semantic-release-pull-request-analyzer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245764658,"owners_count":20668456,"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":["github","semantic-release","semantic-release-plugin"],"created_at":"2024-10-30T08:07:21.836Z","updated_at":"2025-03-27T01:31:15.500Z","avatar_url":"https://github.com/bobvanderlinden.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# semantic-release-pull-request-analyzer\n\nA plugin for semantic-release that analyzes GitHub pull request labels instead of semantic commit messages. It allows using `semantic-release` without requiring semantic-commits.\n\nIt goes through commits and looks up the labels of the associated merged pull requests. From the labels it determines the release type.\n\nIn addition, it uses [GitHub automatically generates release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) to generate release notes. This may be configured using [`release.yml`](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#example-configurations).\n\n## Usage\n\nThe plugin can be configured in the [semantic-release configuration file](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration):\n\n```json\n{\n  \"plugins\": [\n    [\n      \"@bobvanderlinden/semantic-release-pull-request-analyzer\",\n      {\n        \"labels\": {\n          \"enhancement\": \"minor\",\n          \"documentation\": \"patch\",\n          \"bug\": \"patch\"\n        }\n      }\n    ]\n  ]\n}\n```\n\nWith this example:\n\n- merged pull requests with label `enhancement` will result in a `minor` release.\n- merged pull requests with label `documentation` will result in a `patch` release.\n- merged pull requests with label `bug` will result in a `patch` release.\n\nNote that this plugin will only associate pull requests with the merge-commit title `Merged pull request #XXX from`. This is the default merge-commit title that GitHub uses for non-squash, non-rebase merges.\n\n## Configuration\n\nMake sure there is a valid `GITHUB_TOKEN` that has at least `contents: read` rights.\n\nMake sure `@semantic-release/commit-analyzer` nor `@semantic-release/release-notes-generator` are included plugins. These plugins conflict with the commit analyzer and release note generator of `semantic-release-pull-request-analyzer`.\n\n### Options\n\n| Option | Description |\n| ------ | ----------- |\n| `labels` | Required. An object that maps GitHub pull request labels to release types. The keys are the label names and the values are the corresponding release types. |\n| `repository` | Optional. The owner/repo of the GitHub repository. Example `myusername/myproject`. Defaults to using `GITHUB_REPOSITORY`. |\n| `apiUrl` | Optional. The GitHub API URL. Defaults to `GITHUB_API_URL`. |\n| `token` | Optional. The GitHub token. Defaults to `GITHUB_TOKEN`. |\n\nPossible release types are:\n\n- `prerelease`\n- `prepatch`\n- `patch`\n- `preminor`\n- `minor`\n- `premajor`\n- `major`\n\n### Environment variables\n\n| Variable              | Description                           |\n| --------------------- | ------------------------------------- |\n| `GITHUB_TOKEN`        | Required. Token for GitHub API access. |\n| `GITHUB_API_URL`      | Optional. URL for the GitHub API. Defaults to `https://api.github.com`              |\n| `GITHUB_REPOSITORY`   | Optional. Owner/repo of the GitHub repository. Example `myusername/myproject`. Defaults to [`repositoryUrl`](https://semantic-release.gitbook.io/semantic-release/usage/configuration#repositoryurl)       |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobvanderlinden%2Fsemantic-release-pull-request-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbobvanderlinden%2Fsemantic-release-pull-request-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobvanderlinden%2Fsemantic-release-pull-request-analyzer/lists"}