diff --git a/.changeset/tricky-months-whisper.md b/.changeset/tricky-months-whisper.md new file mode 100644 index 000000000..e789e549a --- /dev/null +++ b/.changeset/tricky-months-whisper.md @@ -0,0 +1,5 @@ +--- +"@changesets/get-github-info": patch +--- + +Improved the error message for a missing `GITHUB_TOKEN` to include the information about the required permissions. diff --git a/packages/get-github-info/src/index.ts b/packages/get-github-info/src/index.ts index ba40745c3..2378f369c 100644 --- a/packages/get-github-info/src/index.ts +++ b/packages/get-github-info/src/index.ts @@ -81,7 +81,7 @@ function makeQuery(repos: ReposWithCommitsAndPRsToFetch) { const GHDataLoader = new DataLoader(async (requests: RequestData[]) => { if (!process.env.GITHUB_TOKEN) { throw new Error( - "Please create a GitHub personal access token at https://github.com/settings/tokens/new and add it as the GITHUB_TOKEN environment variable" + "Please create a GitHub personal access token at https://github.com/settings/tokens/new with `read:user` and `repo:status` permissions and add it as the GITHUB_TOKEN environment variable" ); } let repos: ReposWithCommitsAndPRsToFetch = {};