Comments (12)
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.
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.
I'll adjust these things and update the PR then.
from api.
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.
Is this Issue meant as a Github-Integration within the Nest-App?
from api.
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.
I'll start working on this. You can assign this Issue to me if you want.
from api.
Great, thanks 👍 . Sure assigned 🎉
from api.
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:
- could you please specify which of the properties are mandatory, and which of them are optional?
- Will we accept any Key, Value pairs in communityStats Object, or do we need to specify this more?
- Should we implement the Validationpipe mentionend in #41?
from api.
Amazing, thank you 👍 - great questions ❤️
from api.
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.
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)
- [BUG] Link to api.eddiehub.io returns Error 503 HOT 1
- [FEATURE] Emit Event via Websockets whenever a new Github Event is created HOT 1
- [DOCS] - Add community.yml HOT 1
- [FEATURE] GitHub events to come in via web hook HOT 7
- [BUG] Update Location not working properly
- [OTHER] Fix vulnerable packages and remove tslint HOT 1
- Introduce Pagination
- [BUG] Update Link in README HOT 3
- [OTHER] Link to the documentation is not working https://eddiehubcommunity.github.io/api/ HOT 6
- [OTHER] redundant return await affects performance HOT 2
- [FEATURE] Extend websocket object
- [BUG] Enable Cors HOT 2
- GitHub Actions Enhancements
- [OTHER] Improve the `.dockerignore` file to reduce the build image size
- Add Collection for storing the most recent Events HOT 1
- Adjust Websocket DTO HOT 1
- Update Dependencies HOT 2
- Add Pagination to `/github/{id}/events` HOT 2
- Add Pagination to `/github` HOT 3
- [FEATURE] Consolidate build lint and test into one workflow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.