Code Monkey home page Code Monkey logo

Comments (29)

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024 1

You can create one for yourself and try with that.
Make sure, you don't commit that. You can put that in the .env file
For the project deployment, I'll use mine

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024 1

Oops, forgot that.
In that case, you can return something like :

contributors = [
    {
        "name": "Contributor 1",
        "username": "contri1",
        "profile_url": "https://github.com/contri1/"
    },
    {
        "name": "Contributor 2",
        "username": "contri2",
        "profile_url": "https://github.com/contri2/"
    }
]
return contributors

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024 1

Nope, I don't think so as the user need not perform any extra step for getting added as contributors

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024 1

There were some minor bugs in the workflows.
Need not worry about them

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024 1

Thanks for contributing @Tawishi
Feel free to add more features, and create issues

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

hey @ashutoshkrris. I would like to work on this issue

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024

Sure @Tawishi , go ahead!

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

I am able to fetch the contributors, excluding the bot, using the Github API
where do we want these to be added in the backend?

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024

you can create a file called contributors.py within the core package @Tawishi
also, if possible use Github access tokens to increase the number of requests

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

ok @ashutoshkrris

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

@ashutoshkrris what data is needed out of this?

"author": {
            "login": "ashutoshkrris",
            "id": 47353498,
            "node_id": "MDQ6VXNlcjQ3MzUzNDk4",
            "avatar_url": "https://avatars.githubusercontent.com/u/47353498?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/ashutoshkrris",
            "html_url": "https://github.com/ashutoshkrris",
            "followers_url": "https://api.github.com/users/ashutoshkrris/followers",
            "following_url": "https://api.github.com/users/ashutoshkrris/following{/other_user}",
            "gists_url": "https://api.github.com/users/ashutoshkrris/gists{/gist_id}",
            "starred_url": "https://api.github.com/users/ashutoshkrris/starred{/owner}{/repo}",
            "subscriptions_url": "https://api.github.com/users/ashutoshkrris/subscriptions",
            "organizations_url": "https://api.github.com/users/ashutoshkrris/orgs",
            "repos_url": "https://api.github.com/users/ashutoshkrris/repos",
            "events_url": "https://api.github.com/users/ashutoshkrris/events{/privacy}",
            "received_events_url": "https://api.github.com/users/ashutoshkrris/received_events",
            "type": "User",
            "site_admin": false
        }

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024

From this API, the avatar_url and html_url would be fine. Also, there is some other API to fetch user details such as it's name. Can we use that to get the contributor's name? @Tawishi

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

ok, so getting the avatar_url and html_url is done
looking for a way to get the contributor's name

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024

This API might be useful : https://api.github.com/users/{username}

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

this works @ashutoshkrris
we have the avatar_url html_url and name now
so contributors.py has 2 functions -

  • for getting contributors avatar_url, html_url, github username
  • for getting name of contributor using github username

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024

We're making use of GITHUB API TOKENS in the headers, right?

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

almost forgot that. working on it

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024

Hey @Tawishi
Head over to #13 and let's discuss this

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

i got the answer in the docs that is why I removed the comment @ashutoshkrris
Thank you for the update, anyways

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

we will use whose personal token here?

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

what should the data be returned as, any specific return type of the required contributor information like JSON, etc.?

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024

you can just return a python dictionary from your function or method.

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

ok

from eazyloader.

ashutoshkrris avatar ashutoshkrris commented on July 28, 2024

you can return like this :

result = {
    "username": username,
    "name": name,
    "profile_url": html_url
}
return result

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

we have a list of contributors, so a list of such dictionaries? or how do you suggest I represent multiple contributors?

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

all done. I will create a PR
Please ping here in case changes are needed.

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

does this need any documentation update?

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

@ashutoshkrris checks are failing. Could you please check if any changes are needed from my end?

from eazyloader.

Tawishi avatar Tawishi commented on July 28, 2024

Thank you @ashutoshkrris for your sypport and patience

from eazyloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.