Updated games folder to reflect changes in citra-games-wiki a4faaa9. Updated maximum number of Github bug pages are searched.
This commit is contained in:
parent
32fa5954f4
commit
1b896d8673
|
@ -14,7 +14,7 @@ const blackfriday = require('./blackfriday.js');
|
||||||
const del = require('delete');
|
const del = require('delete');
|
||||||
const exec = require('sync-exec');
|
const exec = require('sync-exec');
|
||||||
|
|
||||||
const fsPathCode = './citra-games-wiki';
|
const fsPathCode = './citra-games-wiki/games';
|
||||||
const fsPathWiki = './citra-games-wiki.wiki';
|
const fsPathWiki = './citra-games-wiki.wiki';
|
||||||
const fsPathHugoContent = '../../site/content/game';
|
const fsPathHugoContent = '../../site/content/game';
|
||||||
const fsPathHugoBoxart = '../../site/static/images/game/boxart';
|
const fsPathHugoBoxart = '../../site/static/images/game/boxart';
|
||||||
|
@ -42,8 +42,8 @@ function getDirectories (srcpath) {
|
||||||
async function getGithubIssues() {
|
async function getGithubIssues() {
|
||||||
var results = [];
|
var results = [];
|
||||||
|
|
||||||
// Force the while loop out after 10 calls.
|
// Only loop through the first x pages to prevent API limiting.
|
||||||
for (var page = 0; page <= 3; page++) {
|
for (var page = 0; page <= 15; page++) {
|
||||||
let options = {
|
let options = {
|
||||||
url: `https://api.github.com/repos/citra-emu/citra/issues?per_page=99&page=${page}`,
|
url: `https://api.github.com/repos/citra-emu/citra/issues?per_page=99&page=${page}`,
|
||||||
headers: { 'User-Agent': 'citrabot' }
|
headers: { 'User-Agent': 'citrabot' }
|
||||||
|
@ -65,10 +65,10 @@ async function getGithubIssues() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch game information stored in Github repository.
|
// Fetch game information stored in Github repository.
|
||||||
gitPull(fsPathCode, 'https://github.com/citra-emu/citra-games-wiki.git');
|
gitPull('./citra-games-wiki', 'https://github.com/citra-emu/citra-games-wiki.git');
|
||||||
|
|
||||||
// Fetch game articles stored in Github wiki.
|
// Fetch game articles stored in Github wiki.
|
||||||
gitPull(fsPathWiki, 'https://github.com/citra-emu/citra-games-wiki.wiki.git');
|
gitPull('./citra-games-wiki.wiki', 'https://github.com/citra-emu/citra-games-wiki.wiki.git');
|
||||||
|
|
||||||
// Fetch all issues from Github.
|
// Fetch all issues from Github.
|
||||||
var githubIssues = null;
|
var githubIssues = null;
|
||||||
|
@ -188,7 +188,7 @@ function processGame(game) {
|
||||||
// GITHUB ISSUES BLOCK
|
// GITHUB ISSUES BLOCK
|
||||||
model.issues = [];
|
model.issues = [];
|
||||||
model.closed_issues = [];
|
model.closed_issues = [];
|
||||||
|
|
||||||
if (model.github_issues != null && model.github_issues.length > 0) {
|
if (model.github_issues != null && model.github_issues.length > 0) {
|
||||||
model.github_issues.forEach(function(number) {
|
model.github_issues.forEach(function(number) {
|
||||||
let issue = githubIssues.find(x => x.number == number);
|
let issue = githubIssues.find(x => x.number == number);
|
||||||
|
|
Reference in New Issue