Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Recent Contributors list #222

Closed
jywarren opened this issue Jun 18, 2019 · 7 comments
Closed

Bug in Recent Contributors list #222

jywarren opened this issue Jun 18, 2019 · 7 comments

Comments

@jywarren
Copy link
Member

Hi! I was on the page today https://code.publiclab.org/#r=all and noticed Recent Contributors was blank, with an error on what I think is this line, in fetchAllRecentMonthCommits:

if(!commitersSet.has(commit.author.login)) {

The error is:

Uncaught (in promise) TypeError: Cannot read property 'login' of null
    at mappingToCommits (community-toolbox.js:82273)
    at Array.map (<anonymous>)
    at gotResponseJson (community-toolbox.js:82271)
    at async Promise.all (/index 5)

It looks like we're not running the latest, as the error on gh-pages shows this code:

                .then(function gotResponseJson(response) {
                    if(response!=null) {
                        let partialResult = [];
                        response.map(function mappingToCommits(commit, i) {
                            if(commit!=null) {
                                if(!commitersSet.has(commit.author.login)) { // this line causes the error
                                    commitersSet.add(commit.author.login);
                                    partialResult.push(commit);
                                    results.push(commit);
                                }
                            }
                            return true;
                        });

Just trying to document well! Maybe this is fixed in the latest code and we need to publish? Thanks!

@jywarren
Copy link
Member Author

could be related to #202 ?

@Rishabh570
Copy link
Collaborator

@jywarren Yes, this bug is fixed in the latest version...I'm pushing the latest one to gh-pages.

@Rishabh570
Copy link
Collaborator

@jywarren I'm not able to get the site running again, please help...

@jywarren
Copy link
Member Author

No prob! let me take a look.

@jywarren
Copy link
Member Author

Thanks for already having fixed this! :-)

OK, so you have to preserve the existing gh-pages branch, you can't force push to it, because it has to include the node_modules folder as well (since it needs some of the dependencies to run). So I merge commit to gh-pages; my process is:


git checkout main
git pull publiclab main
git checkout gh-pages
git merge main -m 'merge from main'
npm install # in case there are any new npm modules needed
git add -f node_modules
git commit -m 'new node modules'
git push publiclab gh-pages
git checkout main
npm install

@jywarren
Copy link
Member Author

Up again with latest! https://code.publiclab.org/#r=all

@Rishabh570
Copy link
Collaborator

Ooh, so I accidentally removed node_modules I guess...thanks for clarifying the steps required 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants