Code Monkey home page Code Monkey logo

Comments (12)

eddiejaoude avatar eddiejaoude commented on August 23, 2024 1

Oh sorry just seeing this notification now. We have a GitHub Action that will send stats from our community Org Repos to our API

from api.

eddiejaoude avatar eddiejaoude commented on August 23, 2024 1

Thanks for the questions @Cahllagerfeld , here are my thoughts...

could you please specify which of the properties are mandatory, and which of them are optional?

I think the username is the only required property

Will we accept any Key, Value pairs in communityStats Object, or do we need to specify this more?

Ideally we should specify these, and do a check that it is in our allowed list. The list will come from GitHub events, here is the example usage for where the data will come from, and here are the docs for the list of events

Should we implement the Validationpipe mentionend in #41?

I think that would be great 👍 , it would allow us to re-use the validation in multiple places

from api.

Cahllagerfeld avatar Cahllagerfeld commented on August 23, 2024 1

I'll adjust these things and update the PR then.

from api.

eddiejaoude avatar eddiejaoude commented on August 23, 2024 1

Sure, no problem 👍 sorry for not being clear

Is this an object in which the properties are github-events

yes you are correct - each time an event happens, the GitHub Action will send the event name and our API needs to increment it. Thinking about it before with Firebase, the Firestore DB did the increment, but our API will need to do it now

So I think the request from the GitHub Action can be

// POST
{
   // ...
   event: {
       issues: true
   }
}

Then we should increment the issues property by 1. Note, in event object there will only be 1 property at a time, but it could be issues, pull_requests ... or any other event type by GitHub (they use underscore and we use camelcase, so I think we should map their events to our style)

I am open to suggestions if you can think/see any improvements 🤓

from api.

Cahllagerfeld avatar Cahllagerfeld commented on August 23, 2024

Is this Issue meant as a Github-Integration within the Nest-App?

from api.

Cahllagerfeld avatar Cahllagerfeld commented on August 23, 2024

Thats nice! Luckily we dont have to handle different Accesstokens for different users then.
On the other hand this means, that we need a Github-Data-Collection Module right?

from api.

Cahllagerfeld avatar Cahllagerfeld commented on August 23, 2024

I'll start working on this. You can assign this Issue to me if you want.

from api.

eddiejaoude avatar eddiejaoude commented on August 23, 2024

Great, thanks 👍 . Sure assigned 🎉

from api.

Cahllagerfeld avatar Cahllagerfeld commented on August 23, 2024

GitHub

interface GitHub {
   username: string;
   bio: string; // do we need Discord bio?
   avatarUrl: string
   followers: number;
   repos: number;
   // ... any other useful info public info https://docs.github.com/en/rest/reference/users
   communityStats: {
      [key: string]: number
   };
}

Also playing with #61

Hi Eddie,
I've got several open questions:

  1. could you please specify which of the properties are mandatory, and which of them are optional?
  2. Will we accept any Key, Value pairs in communityStats Object, or do we need to specify this more?
  3. Should we implement the Validationpipe mentionend in #41?

from api.

eddiejaoude avatar eddiejaoude commented on August 23, 2024

Amazing, thank you 👍 - great questions ❤️

from api.

Cahllagerfeld avatar Cahllagerfeld commented on August 23, 2024

I'm currently coding the TypeValidation for the DTO, but I'm still not getting the community stats completly I think.
Is this an object in which the properties are github-events or am I getting this wrong?

Could you explain it again pls? 😓

from api.

Cahllagerfeld avatar Cahllagerfeld commented on August 23, 2024

I think I got it now. My first thought would be, that mapping the value is probably the best idea.
I'll think about it tomorrow if this could be optimizable at some point.

from api.

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.