paulodiovani / hacktoberrank

Hacktoberfest Rank
https://hacktoberrank-challenge.herokuapp.com/
MIT License
6 stars 17 forks source link

Fixed version of fetch_list_pullrequests #25

Closed arabyalhomsi closed 4 years ago

arabyalhomsi commented 4 years ago

I fixed it by reapplying all changes as you suggested. The disadvantage of this I guess, is that all changes are in one commit. I think it is fine!

paulodiovani commented 4 years ago

Note: your PR is from master, I think it may be better to create from fetch_list_pullrequests-fix

paulodiovani commented 4 years ago

@arabyalhomsi hey, I just noticed we are not storing the username.

$  curl http://localhost:8001/api/v1/pulls | python -m json.tool                                                                                                                            

[        
    [                                                                                                                  
        "39814207",                                                                                                    
        [                                                                                                              
            "https://github.com/asm0dey/mystamps/pull/44",                                                             
            "https://github.com/5H3LL3H5/vim-markdown/pull/5",                                                         
            "https://github.com/marryton007/patchwork/pull/128",                                                       
            "https://github.com/Pandinosaurus/tfjs/pull/181",                                                          
            "https://github.com/sethbergman/next.js/pull/846",                                                         
            "https://github.com/changeworld/azure-docs.pt-pt/pull/804",                                                
            "https://github.com/kcolford/blackarch/pull/106"
        ]
    ],
    [
        "27856297",
        [
            "https://github.com/jmcdo29/nestjs-telegram/pull/79",
            "https://github.com/killtheliterate/observable-socket/pull/142",
            "https://github.com/ajmalafif/netsby/pull/814"
        ]
    ],
    [
        "4866722",
        [
            "https://github.com/learn-co-students/react-component-mounting-and-unmounting-lab-houston-web-080519/pull/3"
        ]
    ],
...

I suggest we change the response to an array of objects:


[
  {
    "userid": 999,
    "username":  "paulodiovani",
    "pullrequests": [ "links goes here" ]
  },
  { ... }
]
paulodiovani commented 4 years ago

Replaced by #26