Skip to content

Commit 230d94f

Browse files
committed
Added a fix for infinite loading bug
1 parent 40ad90d commit 230d94f

File tree

11 files changed

+69
-32
lines changed

11 files changed

+69
-32
lines changed

.idea/Codebadge.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/badges/predefined/predefinedBadges.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default class PredefinedBadges {
99
url = "/assets/badges/predefined/" + badge.badge;
1010
}
1111
});
12-
console.log(url);
12+
//console.log(url);
1313
return url;
1414
}
1515
}

src/components/auth/Login.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default {
3535
const code = window.location.href.match(/\?code=(.*)/);
3636
if (code) {
3737
this.isLoading = true;
38-
console.log(this.isLoading);
3938
axios({
4039
method: `post`,
4140
url: `${AxiosHelper.gatekeeperUrl}?client_id=${

src/components/org/OrgContributors.vue

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,34 @@ export default {
4646
4747
let topContributors = [];
4848
const orgRepos = await this.getRepos();
49-
50-
for (let i = 0; i < orgRepos.length; i++) {
51-
const contributors = await this.getContributors(orgRepos[i].name);
52-
console.log(orgRepos[i].name);
53-
contributors.forEach(function(contributor) {
54-
if (!topContributors.hasOwnProperty(contributor.author.login)) {
55-
topContributors[contributor.author.login] = {
56-
name: contributor.author.login,
57-
total: contributor.total,
58-
weeks: contributor.weeks,
59-
avatar: contributor.author.avatar_url
60-
};
61-
} else {
62-
topContributors[contributor.author.login].total +=
63-
contributor.total;
64-
for (let j = 0; j < contributor.weeks.length; j++) {
65-
topContributors[contributor.author.login].weeks[j].c +=
66-
contributor.weeks[j].c;
67-
topContributors[contributor.author.login].weeks[j].a +=
68-
contributor.weeks[j].a;
69-
topContributors[contributor.author.login].weeks[j].d +=
70-
contributor.weeks[j].d;
49+
try {
50+
for (let i = 0; i < orgRepos.length; i++) {
51+
const contributors = await this.getContributors(orgRepos[i].name);
52+
//console.log(orgRepos[i].name);
53+
contributors.forEach(function (contributor) {
54+
if (!topContributors.hasOwnProperty(contributor.author.login)) {
55+
topContributors[contributor.author.login] = {
56+
name: contributor.author.login,
57+
total: contributor.total,
58+
weeks: contributor.weeks,
59+
avatar: contributor.author.avatar_url
60+
}
61+
} else {
62+
topContributors[contributor.author.login].total +=
63+
contributor.total;
64+
for (let j = 0; j < contributor.weeks.length; j++) {
65+
topContributors[contributor.author.login].weeks[j].c +=
66+
contributor.weeks[j].c;
67+
topContributors[contributor.author.login].weeks[j].a +=
68+
contributor.weeks[j].a;
69+
topContributors[contributor.author.login].weeks[j].d +=
70+
contributor.weeks[j].d;
71+
}
7172
}
72-
}
73-
console.log(contributor);
74-
});
73+
//console.log(contributor);
74+
});
75+
}
76+
} catch(err) {
7577
}
7678
7779
//store this

src/components/org/RepoContributors.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ export default {
5353
.then(res => {
5454
this.sortContributors(res.data);
5555
this.contributors = res.data;
56-
console.log(res.data);
57-
console.log(this.contributors[0].author.avatar_url);
56+
//console.log(res.data);
57+
//console.log(this.contributors[0].author.avatar_url);
5858
})
5959
.catch(err => console.log(err));
6060
},

src/store.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default new Vuex.Store({
2323
mutations: {
2424
SET_USER(state, user) {
2525
state.user = user;
26+
console.log(state.user)
2627
},
2728
SET_USER_ORGS(state, userOrgs) {
2829
state.userOrgs = userOrgs;
@@ -31,7 +32,7 @@ export default new Vuex.Store({
3132
state.orgCommits[payload.orgName] = [];
3233
for(let user in payload.data)
3334
state.orgCommits[payload.orgName].push(payload.data[user]);
34-
console.log(state.orgCommits);
35+
//console.log(state.orgCommits);
3536
},
3637
SET_TOP_COMMITS(state, topCommits) {
3738
state.topCommits = topCommits;
@@ -59,6 +60,7 @@ export default new Vuex.Store({
5960
})
6061
.then(res => context.commit('SET_USER', res.data))
6162
.catch(err => console.log(err));
63+
console.log(localStorage.getItem("token"))
6264
},
6365
loadUserOrgs(context) {
6466
axios

0 commit comments

Comments
 (0)