Skip to content

Commit

Permalink
Merge branch 'release/0.27.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
stylesuxx committed Nov 21, 2022
2 parents 1da78d3 + ac1e354 commit 845a51c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esc-configurator",
"version": "0.27.1",
"version": "0.27.2",
"private": false,
"license": "AGPL-3.0",
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions src/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"title": "0.27.2",
"items": [
"Bugfix: Limit fetching release list for Bluejay to the last 5 releases"
]
},
{
"title": "0.27.1",
"items": [
Expand Down
2 changes: 1 addition & 1 deletion src/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v0.27.0",
"version": "v0.27.2",
"corsProxy": "https://cors.bubblesort.me/?",
"availableLanguages": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/sources/Bluejay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class BluejaySource extends GithubSource {
}

async getVersions() {
return this.getRemoteVersionsList(GITHUB_REPO, blacklist);
return this.getRemoteVersionsList(GITHUB_REPO, blacklist, 5);
}

isValidName(name) {
Expand Down
4 changes: 2 additions & 2 deletions src/sources/GithubSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class GithubSource extends Source {
* @param {Array<string>} blacklist
* @returns
*/
async getRemoteVersionsList(repo, blacklist = []) {
const githubReleases = await fetchJsonCached(`https://api.github.com/repos/${repo}/releases`);
async getRemoteVersionsList(repo, blacklist = [], amount = 100) {
const githubReleases = await fetchJsonCached(`https://api.github.com/repos/${repo}/releases?per_page=${amount}&page=1`);
const releasesWithAssets = githubReleases.filter(
(release) => release.assets.length && !blacklist.includes(release.tag_name)
);
Expand Down

0 comments on commit 845a51c

Please sign in to comment.