import { getCommitInfo } from "@changesets/get-github-info";// ...const getReleaseLine = async (changeset, type) => { const [firstLine, ...futureLines] = changeset.summary .split("\n") .map((l) => l.trimEnd()); const info = await getCommitInfo({ // replace this with your own repo repo: "changesets/changesets", commit: changeset.commit, }); if (info == null) { // may be null if referenced the wrong repo, or the commit has not been pushed // to the repo yet
You'll need to get a GitHub personal access token with read:user and repo:status permissions, and add it to a .env file (it'll be loaded automatically).
GITHUB_TOKEN=token_here
You can now bump your packages and changelogs with changeset version and it'll have the GitHub info. 🎉
GitHub Enterprise Server
If you are using GitHub Enterprise Server, you can configure @changesets/get-github-info to point at it using the following
environment variables: