Skip to content

changelog-github - infer repo name from environment variables #1870

Closed

Description

@mihkeleidast

Currently, when using @changesets/changelog-github, users have to always define the repo name as options: ["@changesets/changelog-github", { "repo": "org/repo" }]

However, in GitHub Actions, the repo name is also available as an environment variable GITHUB_REPOSITORY (see https://docs.github.com/en/actions/reference/workflows-and-actions/variables).

It would simplify usage if the changelog function used that as a fallback, and only throw error if neither of them (env var or options.repo) are defined.

When running locally, this changelog generator already requires user to set up .env with GITHUB_TOKEN and some other env vars, so doesn't make it more complex IMO - also, I think this is mostly used in CI anyway.


Happy to send a PR implementing this.

Activity

  1. Andarist commented on Mar 4, 2026

    @Andarist
    Member

    PRs are welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions