{"_id":"release-drafter","_rev":"4-d84f7be5f4d7fe9aef1938a9a1b4a118","name":"release-drafter","dist-tags":{"next":"7.6.0-next.0","latest":"7.10.0"},"versions":{"7.6.0-next.0":{"name":"release-drafter","version":"7.6.0-next.0","keywords":["actions","release","release-notes","release-automation"],"author":"","license":"MIT","_id":"release-drafter@7.6.0-next.0","maintainers":[{"name":"jetersen","email":"josephp90+npm@gmail.com"}],"homepage":"https://github.com/release-drafter/release-drafter","bugs":{"url":"https://github.com/release-drafter/release-drafter/issues"},"bin":{"release-drafter":"dist/cli.js"},"dist":{"shasum":"ae8928b109175d8718c9678b26145e9fd1c37cf5","tarball":"https://registry.npmjs.org/release-drafter/-/release-drafter-7.6.0-next.0.tgz","fileCount":68,"integrity":"sha512-owZi5suGx2Hltg9eGxoewAlkvTjESS6yBVw/X6c2YQE00vrobR8iNC0H80Ssf3utuItQ9l2fq1vfnMtU2HgJJA==","signatures":[{"sig":"MEUCIQDj8k1hh+xGdRFgri1Rmwvd0QFsoQMD1O8TMuv3EAKqswIgZmdRznWpqmrt6Ge79rOnk451pKRKpMkAmakioW+mPl4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2511586},"type":"module","engines":{"npm":">=12.0.1","node":">=24.0.0"},"exports":{"./drafter":{"types":"./dist/types/drafter.d.ts","default":"./dist/drafter.js"}},"gitHead":"0731fe0eefff3ca5e79ebffa0a88ccf988ba4a32","imports":{"#src/*":"./src/*","#tests/*":"./src/tests/*"},"scripts":{"all":"npm run check && npm run tsc:check && npm run test:run && npm run schemas && npm run build","cli":"npm run build --silent && node dist/cli.js","lint":"biome lint .","test":"vitest","build":"vite build","check":"biome check --write .","codegen":"graphql-codegen -c src/scripts/graphql.codegen-config.ts -v","schemas":"node src/scripts/json-schema.ts","version":"git add package.json package-lock.json","coverage":"node src/scripts/coverage-summary.ts","test:run":"vitest run","tsc:check":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json","preversion":"npm run all && npm run check:clean","check:clean":"node src/scripts/check-clean.ts","postversion":"git push && git push origin v$npm_package_version","format:check":"biome format .","format:write":"biome format --write ."},"_npmUser":{"name":"jetersen","email":"josephp90+npm@gmail.com"},"repository":{"url":"git+https://github.com/release-drafter/release-drafter.git","type":"git"},"_npmVersion":"11.16.0","description":"Drafts your next release notes as pull requests are merged into your branch(es).","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"cac":"^7.0.0","zod":"^4.4.3","yaml":"^2.9.0","ignore":"^7.0.6","semver":"^7.8.5","consola":"^3.4.2","graphql":"^17.0.2","@actions/core":"^3.0.1","@octokit/core":"^7.0.6","@octokit/types":"^16.0.0","@actions/github":"^9.1.1","@octokit/graphql":"^9.0.3","compare-versions":"^6.1.1","escape-string-regexp":"^5.0.0","@octokit/plugin-retry":"^8.1.0","@octokit/request-error":"^7.1.0","conventional-commits-parser":"^6.4.0","@octokit/plugin-paginate-rest":"^14.0.0","@octokit/plugin-paginate-graphql":"^6.0.0","@graphql-typed-document-node/core":"^3.2.0","@octokit/plugin-rest-endpoint-methods":"^17.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nock":"^14.0.16","vite":"^8.1.4","vitest":"^4.1.10","typescript":"^7.0.2","@types/node":"^24.13.3","@types/semver":"^7.7.1","@biomejs/biome":"2.5.3","@vitest/coverage-v8":"^4.1.10","@graphql-codegen/cli":"^7.2.0","@octokit/webhooks-types":"^7.6.1","@graphql-codegen/typescript":"^6.1.0","@graphql-codegen/typed-document-node":"^7.1.0","@graphql-codegen/typescript-operations":"^6.1.0"},"_npmOperationalInternal":{"tmp":"tmp/release-drafter_7.6.0-next.0_1785098283167_0.09258188702490178","host":"s3://npm-registry-packages-npm-production"}},"7.8.0":{"name":"release-drafter","version":"7.8.0","keywords":["actions","release","release-notes","release-automation"],"license":"ISC","_id":"release-drafter@7.8.0","maintainers":[{"name":"jetersen","email":"josephp90+npm@gmail.com"}],"homepage":"https://github.com/release-drafter/release-drafter","bugs":{"url":"https://github.com/release-drafter/release-drafter/issues"},"bin":{"release-drafter":"dist/cli.js"},"dist":{"shasum":"4754d719b7ec8b473740ff9c086356a5f4e01634","tarball":"https://registry.npmjs.org/release-drafter/-/release-drafter-7.8.0.tgz","fileCount":8,"integrity":"sha512-bcTuE1ulVXVdixvvip7uuCPXOLUcaKT+NJc1mPlWImcKJKe1nMnfG7/t24iJNW6LOnDM2i16VaqaNY2d4PFhow==","signatures":[{"sig":"MEYCIQDc5eMs43YdtqnR+Zpj694hMFmAScvs4nAlt7mmKsixxAIhAJj+pDc31lJwQ/I1Schp0XbvkqFdAiVD/k3KplTlVzOx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":644231},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":{"default":"./dist/index.d.ts","release-drafter-source":"./src/index.ts"},"import":"./dist/index.js","release-drafter-source":"./src/index.ts"}},"gitHead":"c345907820e0396f6f44bcfd9ac4763325f8feb0","scripts":{"build":"vite build --config ../../vite.workspace.config.ts && node ../../src/scripts/third-party-notices.ts","prepack":"node ../../src/scripts/third-party-notices.ts","test:run":"vitest run --config ../../vite.workspace.config.ts","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"jetersen","email":"josephp90+npm@gmail.com","approver":{"name":"jetersen","email":"josephp90+npm@gmail.com"}},"repository":{"url":"git+https://github.com/release-drafter/release-drafter.git","type":"git"},"_npmVersion":"12.2.0","description":"Programmatic API and command-line interface for Release Drafter.","directories":{},"_nodeVersion":"24.21.0","dependencies":{"undici":"^6.28.1","@octokit/core":"^7.0.8","@gitbeaker/rest":"43.8.0","@octokit/plugin-retry":"^8.1.1","@octokit/plugin-paginate-rest":"^15.0.0","@octokit/plugin-paginate-graphql":"^6.0.0","@octokit/plugin-rest-endpoint-methods":"^18.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^5.0.1","@release-drafter/cli":"*","@release-drafter/core":"*","@release-drafter/gitea-adapter":"*","@release-drafter/github-adapter":"*","@release-drafter/gitlab-adapter":"*","@release-drafter/forgejo-adapter":"*"},"_npmOperationalInternal":{"tmp":"tmp/release-drafter_7.8.0_1790878099438_0.6286642017534627","host":"s3://npm-registry-packages-npm-production"}},"7.9.0":{"name":"release-drafter","version":"7.9.0","keywords":["actions","release","release-notes","release-automation"],"license":"ISC","_id":"release-drafter@7.9.0","maintainers":[{"name":"jetersen","email":"josephp90+npm@gmail.com"}],"homepage":"https://github.com/release-drafter/release-drafter","bugs":{"url":"https://github.com/release-drafter/release-drafter/issues"},"bin":{"release-drafter":"dist/cli.js"},"dist":{"shasum":"429a6e0dbe0e71f0a916085f6e1733a77382f99e","tarball":"https://registry.npmjs.org/release-drafter/-/release-drafter-7.9.0.tgz","fileCount":8,"integrity":"sha512-Dltgrf2LybrqVI78aigi8F0LA2JcDowB/iqJzKnGEXo3rixt0HQlbes0ggjOVb29m4AU2UqHRaXKv4+ojnDb3g==","signatures":[{"sig":"MEYCIQCds1hTwt/jeaI2lL3u8GFojUbd45T60QtU+sIz/rT5eAIhAPAaJmo3BDo8hvFiWf4ux/RODMR7NHipQ2EKCHnfTv8Z","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/release-drafter@7.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":649866},"type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":{"default":"./dist/index.d.ts","release-drafter-source":"./src/index.ts"},"import":"./dist/index.js","release-drafter-source":"./src/index.ts"}},"gitHead":"72967cdc98ddd3160f1fc3dff619de365e137dd0","scripts":{"build":"vite build --config ../../vite.workspace.config.ts && node ../../src/scripts/third-party-notices.ts","prepack":"node ../../src/scripts/third-party-notices.ts","test:run":"vitest run --config ../../vite.workspace.config.ts","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"jetersen","email":"josephp90+npm@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"b9a0ddc5-da95-4377-b307-a7dee649f966"}},"repository":{"url":"git+https://github.com/release-drafter/release-drafter.git","type":"git"},"_npmVersion":"12.0.1","description":"Programmatic API and command-line interface for Release Drafter.","directories":{},"_nodeVersion":"24.21.0","dependencies":{"undici":"^6.28.1","@octokit/core":"^7.0.8","@gitbeaker/rest":"43.8.0","@octokit/plugin-retry":"^8.1.1","@octokit/plugin-paginate-rest":"^15.0.0","@octokit/plugin-paginate-graphql":"^6.0.0","@octokit/plugin-rest-endpoint-methods":"^18.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^5.0.1","@release-drafter/cli":"*","@release-drafter/core":"*","@release-drafter/gitea-adapter":"*","@release-drafter/github-adapter":"*","@release-drafter/gitlab-adapter":"*","@release-drafter/forgejo-adapter":"*"},"_npmOperationalInternal":{"tmp":"tmp/release-drafter_7.9.0_1790910690741_0.025466996358763483","host":"s3://npm-registry-packages-npm-production"}},"7.10.0":{"_id":"release-drafter@7.10.0","bin":{"release-drafter":"dist/cli.js"},"bugs":{"url":"https://github.com/release-drafter/release-drafter/issues"},"dist":{"shasum":"31ba876288b29a6428897bddfa3837c110d175ef","tarball":"https://registry.npmjs.org/release-drafter/-/release-drafter-7.10.0.tgz","integrity":"sha512-ihVBYDY/+A+XE/ONmBYLfrblHu3y4f2oUhVDj6N3sgY5mhdLSfBN8rf2xsLLcADiu5600ykWmUs7XXo3Fn0RdA==","fileCount":8,"unpackedSize":654773,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/release-drafter@7.10.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD1jfKLnRgbf71MvU3x/xWRRCq+Xj4vDxSrtzk3CiU6/wIgV52DZ1lUH6mJtS2M03ehwvrp/8kHu1f3VvdlwtYjyKU="}]},"name":"release-drafter","type":"module","engines":{"node":">=24.0.0"},"exports":{".":{"types":{"default":"./dist/index.d.ts","release-drafter-source":"./src/index.ts"},"import":"./dist/index.js","release-drafter-source":"./src/index.ts"}},"gitHead":"978bb0b30c5ee8cdd332ced253758157150d43f0","license":"ISC","scripts":{"build":"vite build --config ../../vite.workspace.config.ts && node ../../src/scripts/third-party-notices.ts","prepack":"node ../../src/scripts/third-party-notices.ts","test:run":"vitest run --config ../../vite.workspace.config.ts","typecheck":"tsc --noEmit -p tsconfig.json"},"version":"7.10.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"b9a0ddc5-da95-4377-b307-a7dee649f966"},"approver":{"name":"jetersen","email":"josephp90+npm@gmail.com"}},"homepage":"https://github.com/release-drafter/release-drafter","keywords":["actions","release","release-notes","release-automation"],"repository":{"url":"git+https://github.com/release-drafter/release-drafter.git","type":"git"},"_npmVersion":"12.0.1","description":"Programmatic API and command-line interface for Release Drafter.","directories":{},"maintainers":[{"name":"jetersen","email":"josephp90+npm@gmail.com"}],"_nodeVersion":"24.21.0","dependencies":{"@octokit/core":"^7.0.8","@gitbeaker/rest":"43.8.0","@octokit/plugin-retry":"^8.1.1","@octokit/plugin-paginate-rest":"^16.0.0","@octokit/plugin-paginate-graphql":"^6.0.0","@octokit/plugin-rest-endpoint-methods":"^18.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"vitest":"^5.0.3","@release-drafter/cli":"*","@release-drafter/core":"*","@release-drafter/gitea-adapter":"*","@release-drafter/github-adapter":"*","@release-drafter/gitlab-adapter":"*","@release-drafter/forgejo-adapter":"*"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/release-drafter_7.10.0_1791400822451_0.19986875707804952"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-26T20:38:03.054Z","modified":"2026-10-07T19:20:22.840Z","7.6.0-next.0":"2026-07-26T20:38:03.336Z","7.8.0":"2026-10-01T18:08:19.536Z","7.9.0":"2026-10-02T03:11:30.845Z","7.10.0":"2026-10-07T19:20:22.537Z"},"bugs":{"url":"https://github.com/release-drafter/release-drafter/issues"},"license":"ISC","homepage":"https://github.com/release-drafter/release-drafter","keywords":["actions","release","release-notes","release-automation"],"repository":{"url":"git+https://github.com/release-drafter/release-drafter.git","type":"git"},"description":"Programmatic API and command-line interface for Release Drafter.","maintainers":[{"name":"jetersen","email":"josephp90+npm@gmail.com"}],"readme":"<h1 align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/release-drafter/release-drafter/main/docs/design/logo.svg\" alt=\"Release Drafter Logo\" width=\"450\" />\n</h1>\n\nThe public `release-drafter` package provides a forge-neutral programmatic API\nand a command-line interface. It requires Node.js 24 or later.\n\n## CLI\n\nInstall the package globally or in a project:\n\n```sh\nnpm install --global release-drafter\n# or\nnpm install --save-dev release-drafter\n```\n\nRun the CLI without installing it:\n\n```sh\nnpx release-drafter owner/repo --dry-run\n```\n\nFor GitHub, Gitea, and Forgejo, use `owner/repo`. For GitLab, use\n`namespace/project`. A GitLab namespace can contain multiple segments.\n\n### Authentication\n\nThe CLI selects credentials for the target host in this order:\n\n- GitHub.com and GitHub Enterprise Cloud on `*.ghe.com`: `--token`, then\n  `GH_TOKEN`, then `GITHUB_TOKEN`\n- GitHub Enterprise Server: `--token`, then `GH_ENTERPRISE_TOKEN`, then\n  `GITHUB_ENTERPRISE_TOKEN`\n- Gitea: `--token`, then `GITEA_TOKEN`\n- Forgejo: `--token`, then `FORGEJO_TOKEN`\n- GitLab: `--token`, then `GITLAB_TOKEN`\n\nRelease Drafter does not use GitHub-hosted token variables for a GitHub\nEnterprise Server host. It does not reuse tokens between forge types. An\nexplicit API endpoint on a different origin requires an explicit `--token`.\n\nRelease Drafter does not run `gh`. If GitHub CLI manages your credentials, pass\nits token to Release Drafter from the shell:\n\n```sh\nGH_TOKEN=\"$(gh auth token)\" release-drafter owner/repo\n```\n\n### Options\n\n```text\nUsage: release-drafter <repository> [options]\n       release-drafter check-pr <repository> <number> [options]\n\nRepository:\n  owner/name                  GitHub, Gitea, or Forgejo repository\n  namespace/project          GitLab repository; nested namespaces are allowed\n\nOptions:\n  -f, --from <ref>             Change comparison base\n  -n, --name <name>            Release name override\n      --tag <tag>              Release tag override\n  -r, --release-version <ver>  Release version override\n  -t, --to <ref>               Target commitish\n  -c, --config <target>        Config target (default: release-drafter.yml)\n      --dry-run                Calculate without writing\n      --publish [true|false]   Publish the release when true (default: false)\n      --prerelease [true|false]\n      --latest [true|false]\n      --json                   Write one JSON result document to stdout\n      --forge <name>           github, gitea, forgejo, or gitlab\n      --server-url <url>       Forge web URL\n      --api-url <url>          Forge REST API URL\n      --graphql-url <url>      Forge GraphQL API URL\n      --token <token>          Forge token (overrides environment variables)\n      --help                   Show help\n      --version                Show version\n```\n\n`--publish`, `--prerelease`, and `--latest` accept `true` or `false`. If you omit\nthe value, the CLI uses `true`.\n\nGitHub is the default forge. Gitea defaults to `https://gitea.com`, Forgejo\ndefaults to `https://codeberg.org`, and GitLab defaults to\n`https://gitlab.com`. Pass `--server-url` for a self-hosted instance. Pass\n`--api-url` only when its REST endpoint is nonstandard.\n\nGitLab Releases do not support drafts or prerelease semantics. For GitLab,\n`--publish false` calculates and returns the proposed release without writing\nit. `--publish true` creates or updates a non-prerelease release. A prerelease\npayload is rejected before any GitLab request is sent.\n\n### Examples\n\nCalculate a release without creating or updating it:\n\n```sh\nnpx release-drafter owner/repo --dry-run\n```\n\nCompare a specific range and target the `main` branch:\n\n```sh\nnpx release-drafter owner/repo --from v2.0.0 --to main --dry-run\n```\n\nOverride the calculated release metadata:\n\n```sh\nnpx release-drafter owner/repo \\\n  --name 'Version 2.1' \\\n  --tag v2.1.0 \\\n  --release-version 2.1.0 \\\n  --dry-run\n```\n\nPublish a prerelease and control GitHub's latest release setting:\n\n```sh\nnpx release-drafter owner/repo \\\n  --publish true \\\n  --prerelease true \\\n  --latest false\n```\n\nSet each Boolean option explicitly:\n\n```sh\nnpx release-drafter owner/repo \\\n  --publish false \\\n  --prerelease false \\\n  --latest true\n```\n\n### Check a pull request\n\nUse `check-pr` to validate a pull request with the same category rules as the\nCheck PR action:\n\n```sh\nnpx release-drafter check-pr owner/repo 123\n```\n\nThe command loads configuration from the pull request's base branch. A\ncondition that contains `conventional` validates the title. A condition that\ncontains `label` or `labels` validates the current labels. If a condition\ncontains both types of rule, the title and labels must match.\n\nThe command does not evaluate `path` or `paths`. A condition that contains only\npath rules cannot pass validation. A matching `pre-exclude` category skips the\npull request. A fallback category without a `when` condition does not make the\npull request valid.\n\nThe command exits with `0` for valid or excluded pull requests and `1` for an\ninvalid pull request. In JSON mode, it returns the pull request number, title,\nlabels, status, validity, skip status, and number of selected categories.\n`labels` is a JSON array of unique, sorted labels matched by successful\nconfiguration conditions under Check PR's validation rules. Unrelated labels\nare omitted. For excluded PRs, it contains labels matched by pre-include and\npre-exclude conditions; invalid PRs can still report matching pre-include labels:\n\n```sh\nnpx release-drafter check-pr owner/repo 123 --json\n```\n\n### JSON automation\n\nUse `--json` for scripts and CI:\n\n```sh\nnpx release-drafter owner/repo --dry-run --json >release.json\n```\n\nJSON mode writes one JSON document to standard output. It writes progress,\nwarnings, diagnostics, and errors to standard error.\n\nThe result contains these fields:\n\n- `action`: `create`, `update`, or `dry-run`\n- `id`: release ID, when an existing or written release is available\n- `html_url` and `upload_url`: release URLs when available\n- `tag_name`, `name`, and `body`: the resolved release payload\n- `labels`: a JSON array of unique, sorted labels matched by successful\n  configuration conditions on included PRs. Only labels present on those PRs\n  contribute. Excluded PRs and unrelated labels are omitted; empty results are `[]`\n- `resolved_version`, `major_version`, `minor_version`, `patch_version`, and\n  `prerelease_version`: calculated version fields when available\n- `target_commitish`: the resolved release target\n- `draft`, `prerelease`, `latest`, and `dry_run`: resolved release and execution\n  booleans\n\nFor example:\n\n```json\n{\n  \"action\": \"dry-run\",\n  \"tag_name\": \"v2.1.0\",\n  \"name\": \"v2.1.0\",\n  \"resolved_version\": \"2.1.0\",\n  \"major_version\": \"2\",\n  \"minor_version\": \"1\",\n  \"patch_version\": \"0\",\n  \"target_commitish\": \"main\",\n  \"draft\": true,\n  \"prerelease\": false,\n  \"latest\": true,\n  \"dry_run\": true,\n  \"body\": \"## What's Changed\\n\",\n  \"labels\": [\"api/user\", \"feature\"]\n}\n```\n\n### Configuration targets\n\n`--config` accepts YAML or JSON from the local file system or the selected forge\nrepository. GitHub.com and GitHub Enterprise Server blob URLs are also\naccepted. Release Drafter resolves repository paths without `.github/` from the\nrepository's `.github/` directory.\n\n```sh\n# Local file. The path is relative to the current working directory.\nnpx release-drafter owner/repo --config file:config/release-drafter.yml --dry-run\n\n# Current repository, current target ref.\nnpx release-drafter owner/repo --config release-drafter.yml --dry-run\n\n# Explicit repository and ref.\nnpx release-drafter owner/repo \\\n  --config github:shared/release-config:.github/release-drafter.yml@main \\\n  --dry-run\n\n# GitHub.com or GitHub Enterprise Server blob URL.\nnpx release-drafter owner/repo \\\n  --config https://github.com/owner/repo/blob/main/.github/release-drafter.yml \\\n  --dry-run\n```\n\nRepository targets use the form\n`[github:][[owner/]repo:]filepath[@ref]`. Local targets use\n`file:relative/path`. The CLI resolves local targets from the current working\ndirectory. The lexical path and the final symlink or junction target must stay\nin that directory.\n\nCLI configuration loading supports Release Drafter's `_extends` chains, including\n`override`, `append`, and `prepend` merge strategies. Relative inherited paths\nstart at the configuration that declares `_extends`. A repository configuration\ncannot extend a local `file:` target.\n\n### Forge selection and custom endpoints\n\nThe CLI supports GitHub, Gitea, Forgejo, and GitLab. GitHub is the default.\nSelect the other forges with `--forge`. GitLab repository arguments use\n`namespace/project`. The namespace can contain multiple segments, such as\n`group/subgroup/project`.\n\n```sh\nnpx release-drafter owner/repo \\\n  --forge github \\\n  --server-url https://github.example.com \\\n  --api-url https://github.example.com/api/v3 \\\n  --graphql-url https://github.example.com/api/graphql \\\n  --dry-run\n```\n\nThe CLI identifies GitHub.com and GitHub Enterprise Server endpoints that use\nthe standard `/api/v3` path. Other endpoint paths, including `/api/v1`, require\nan explicit `--forge` selection. For GitHub Enterprise Cloud on `*.ghe.com`, the\nCLI uses `api.<subdomain>.ghe.com` for REST and GraphQL requests.\n\nOnly GitHub supports `--graphql-url`. Endpoint URLs must be absolute HTTP or\nHTTPS URLs without credentials, query parameters, or fragments. The CLI uses an\nenvironment token only when the configured API endpoint has the expected\norigin. A cross-origin endpoint requires an explicit `--token`.\n\n### Exit codes\n\n| Code | Meaning                                                                                                  |\n| ---- | -------------------------------------------------------------------------------------------------------- |\n| `0`  | The command succeeded, pull request validation passed or skipped, or the command displayed help/version. |\n| `1`  | Pull request validation, authentication, configuration loading, network access, or execution failed.     |\n| `2`  | Command-line usage was invalid or credential resolution failed.                                          |\n\n## Programmatic API\n\n```ts\nimport { createForgeAdapter, draftRelease, loadConfig } from 'release-drafter'\n\nconst adapter = createForgeAdapter({\n  forge: 'github',\n  token: process.env.GITHUB_TOKEN!,\n})\n\nconst repository = {\n  owner: 'release-drafter',\n  name: 'release-drafter',\n  serverUrl: 'https://github.com',\n}\nconst config = await loadConfig({ adapter, repository })\n\nconst result = await draftRelease({\n  adapter,\n  config,\n  repository,\n  input: {\n    publish: false,\n    dryRun: true,\n  },\n})\n\nconsole.log(result.plan.action, result.releasePayload)\n```\n\n`draftRelease(options)` uses the Release Drafter core to calculate a release. It\ncalls the adapter when the selected operation writes a release. The API is\nforge-neutral:\n\n- `adapter` is an injected `ForgeAdapter`. It supplies repository, change, ref,\n  and release operations for the forge.\n- `config` is a fully parsed `DraftReleaseConfig`. Use the standard `loadConfig`\n  helper or supply your own parsed configuration.\n- `input` selects the comparison base and the operation mode. The modes are dry\n  run, draft, and publish.\n- `repository` identifies the target. The package does not read the target from\n  GitHub Actions state.\n- `logger` is optional. Omitting it uses a no-op logger.\n\n`loadConfig(options)` loads `.github/release-drafter.yml` from the repository's\ndefault branch through the supplied adapter. It supports the same YAML/JSON\nfiles, `_extends` chains, merge strategies, and `.github` repository fallback\nas the CLI. It validates the composed configuration, applies defaults, and\nnormalizes categories, replacer expressions, and change grouping.\n\nUse `target` to select another repository configuration or a local\n`file:relative/path` target. `ref` selects the branch or ref used to load the\nconfiguration and supplies the default release commitish. `cwd` sets the base\ndirectory for local files; it defaults to the current working directory. Local\npaths and their symlink targets must stay within that directory. Repository\nconfigurations cannot extend local files. `overrides` applies common config\nvalues, such as `commitish`, `prerelease`, and `latest`, after inheritance.\n`logger` is optional and defaults to a no-op logger.\n\n```ts\nconst config = await loadConfig({\n  adapter,\n  repository,\n  target: 'file:release-drafter.yml',\n  ref: 'main',\n  overrides: { prerelease: true, latest: false },\n})\n```\n\nThe bundled adapters returned by `createForgeAdapter` support configuration\nloading. A custom `RepositoryConfigReader` can provide `getDefaultBranch` and\n`getRepositoryConfig` for another forge or storage layer. Applications that\nalready load and normalize configuration can pass their `DraftReleaseConfig`\ndirectly to `draftRelease`.\n\n`DraftReleaseResult` contains the forge-neutral release plan and normalized\nrelease payload. If the adapter writes a release, the result also contains the\ncreated or updated release.\n\n`DraftReleaseResult.labels` contains the unique, sorted labels matched by\nsuccessful configuration conditions on included PRs, including in dry-run mode.\nIt respects compound title/path predicates and category exclusivity. It is an\nempty array when no configured labels match.\n\nImporting `release-drafter` does not start the CLI, read environment variables,\nor perform network requests.\n\n`createForgeAdapter(options)` creates the bundled `github`, `gitea`, `forgejo`,\nand `gitlab` adapters. The programmatic API requires an explicit token.\n\n## Proxies and custom fetch\n\nThe CLI and bundled adapters use the runtime's built-in `globalThis.fetch` by\ndefault. Configure proxy support in the runtime. With Node.js 24, enable\n[environment proxy support](https://nodejs.org/docs/latest-v24.x/api/cli.html#node_use_env_proxy1)\nwhen starting the process:\n\n```sh\nNODE_USE_ENV_PROXY=1 HTTPS_PROXY=http://proxy.example.com:8080 \\\n  NO_PROXY=localhost,127.0.0.1 npx release-drafter owner/repo --dry-run\n```\n\nFor the programmatic API, pass a custom `fetch` to `createForgeAdapter` when\nyour application manages networking itself:\n\n```ts\nconst adapter = createForgeAdapter({\n  forge: 'github',\n  token: process.env.GITHUB_TOKEN!,\n  fetch: customFetch,\n})\n```\n\nRelease Drafter does not install a proxy dispatcher or change the global fetch.\n","readmeFilename":"README.md"}