Sitelet https://github.com/yarnpkg/yarn/pull/6912/files
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa
- Fixes PnP detection with workspaces (`installConfig` is now read at the top-level)

[#6878](https://github.com/yarnpkg/yarn/pull/6878) - [**Maël Nison**](https://twitter.com/arcanis)

- Adds support for `GITHUB_TOKEN` in `yarn policies set-version`

[#6912](https://github.com/yarnpkg/yarn/pull/6912) - [**Billy Vong**](https://github.com/billyvg)

## 1.13.0

Expand Down
4 changes: 3 additions & 1 deletion src/cli/commands/policies.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ async function fetchReleases(
config: Config,
{includePrereleases = false}: FetchReleasesOptions = {},
): Promise<Array<Release>> {
const token = process.env.GITHUB_TOKEN;
const tokenUrlParameter = token ? `?access_token=${token}` : '';
const request: Array<Release> = await config.requestManager.request({
url: `https://api.github.com/repos/yarnpkg/yarn/releases`,
url: `https://api.github.com/repos/yarnpkg/yarn/releases${tokenUrlParameter}`,
json: true,
});

Expand Down