Comments (11)
Github API token(s) are controlled by the @nodejs/build team. This should probably be integrated in the @nodejs/github-bot which worked with the them to get a token and server(s) for the bot. You'll want to get involved there.
A snag you'll need to work with is that org-wide events are not allowed for security reasons. This means you'd need to get a webhook setup for all repos individually.
from badges.
@amiller-gh I'll defer to @nodejs/github-bot team to make the call.
from badges.
@amiller-gh It has been well over 2 days since I made the issue in https://github.com/nodejs/github-bot, and I have received no response yet. Could you please contact the team on a more personal level, make sure somebody helps me with the accesses we'd need to make this happen?
Thanks.
from badges.
Badger's API: https://api.badgr.io/docs/v2/
GitHub's API: https://developer.github.com/v3/
GitHub webhooks (precisely what we need): https://developer.github.com/webhooks/
Node module for Badgr: https://www.npmjs.com/package/badgr-client
(This should work, atleast for simply issuing badges)
Node module for accessing GitHub's API: https://www.npmjs.com/package/@octokit/rest
Creating hooks using the module: https://octokit.github.io/rest.js/#api-Repos-createHook
@amiller-gh I believe I could prototype this, awaiting your approval.
from badges.
@williamkapke I think that's doable too, I think GH allows you to get all the repos for an org. We could add a routine check to add hooks for any newly formed repos.
from badges.
P.S. The I don't have access to view and/or contact the @nodejs/github-bot team ATM. Any alternative way to get involved?
from badges.
They're at https://github.com/nodejs/github-bot. Just open an issue π
from badges.
@ryzokuken prototype away πExcited to see what you create! Let me know if you need any help getting traction with the github-bot team or have any questions as you're implementing.
@williamkapke, does the org-wide event restriction include listening to team roster changes? That hook would be very valuable for this tool β ex: Awarding a TSC membership badge when a member is added to the organization's TSC team.
from badges.
@amiller-gh any updates?
from badges.
Hey @ryzokuken, sorry for the delay β busy week!
It looks like @phillipj is the primary code contributor, so he may be able to chime in here, or help point us in the right direction.
Otherwise, I'd seriously recommend just pulling down the app and experimenting with it! I don't believe you need any special permissions to get started here. I took a quick look at the bot app and here's what I've gathered (hopefully @phillipj can let me know if I have anything wrong!):
The project appears to be an Express app at its core and scripts are automagically loaded from the scripts directory.
So, once you pull the repo down and get it started up, you would make a new endpoint(s) in the scripts
directory (presumably scripts/badgr.js
) that expects to be pinged in response to certain Github webhooks.
The tests directory contains integration tests for all the endpoints in the app. You would presumably add tests for the badgr endpoints here.
It appears that the more complex tests use fixture data to mock out the Github webhook responses for testing. You can add your own fixture data from the samples provided by Github.
It also uses nock and supertest to mock out HTTP requests. This would be used to mock out responses to and from Github and Badgr in our use case.
As for implementation details, it appears that many of the webhooks that we call don't return the user's public email address, so you may also have to hit up the Github API.
All that being said, you shouldn't need any permissions to start mocking out an end to end implementation and writing tests πDoes that help?
from badges.
from badges.
Related Issues (20)
- Add more information to README HOT 2
- Add Dhruv Jain as _badges_ team member HOT 2
- Add repo access to team HOT 5
- 2018-04-05 Node.js Badges Meeting HOT 10
- New Project - v1 badges list HOT 2
- target: v1 roll out during the Spring Summit
- determining the badgr username/email of the recipient
- how to correlate users to automatically issue badges HOT 3
- Badges β Recurring Meeting Time HOT 9
- Node.js Foundation Badges Meeting 2018-04-19 HOT 2
- Maintaining a list of webhooks for each badge
- Badge for npm modules that support N-API HOT 3
- t
- Set Up a Badge Issuer Account HOT 2
- Badge / Pathway RFC process and template HOT 3
- Badge Release Process
- Badges as Stickers HOT 7
- Node.js Badges Illustration Style Guide HOT 3
- V1 Badges List HOT 15
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 badges.