
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
hubot-kredits
Advanced tools
This repository provides scripts for integrating Kosmos Kredits in Hubot chatbots. The bot will watch for project-related things happening on the Internet and automatically create ERC721 tokens for issuing kredits for project contributions.
You will need an Ethereum wallet for your bot, so it can interact with the
Ethereum smart contracts. npm run create-wallet will do the job for you.
The wallet must be funded with enough ETH to interact with the contracts.
The bot wallet needs the following Aragon contract permissions to interact with kredits-contracts:
ADD_CONTRIBUTION_ROLE on the Contribution contractMANAGE_CONTRIBUTORS_ROLE on the Contributor contractThese permissions can be configured using the Aragon CLI (see kredits-contracts.
aragon dao acl grant [DAO address] [contribution app address] ADD_CONTRIBUTION_ROLE [bot wallet address]
aragon dao acl grant [DAO address] [contributor app address] MANAGE_CONTRIBUTORS_ROLE [bot wallet address]
To get the Contribution and Contributor app addresses use aragon dao apps.
As usual in Hubot, you can add all config as environment variables.
| Key | Description |
|---|---|
KREDITS_WEBHOOK_TOKEN | A string for building your secret webhook URLs |
KREDITS_ROOM | The bot will talk to you in this room |
KREDITS_WALLET_PATH | Path to an Etherum wallet JSON file (default: ./wallet.json) |
KREDITS_WALLET_PASSWORD | Wallet password |
KREDITS_PROVIDER_URL | Ethereum JSON-RPC URL (default: http://localhost:7545) |
KREDITS_WEB_URL | URL of the Kredits Web app (default: https://kredits.kosmos.org) |
KREDITS_DAO_ADDRESS | DAO Kernel address |
KREDITS_SESSION_SECRET | Secret used by grant to sign the session ID |
KREDITS_GRANT_HOST | Host used by grant to generate OAuth redirect URLs (default: localhost:8888) |
KREDITS_GRANT_PROTOCOL | Protocol (http or https) used by grant to generate the OAuth redirect URLs (default: "http") |
The GitHub integration will watch for closed issues and merged pull requests,
which carry a kredits label: kredits-1, kredits-2, kredits-3 for small,
medium and large contributions. If there are multiple people assigned, it will
issue contribution tokens for all of them.
If KREDITS_GITHUB_KEY and KREDITS_GITHUB_SECRET are set, the bot will also
expose OAuth endpoints to authenticate new contributors and register new
contributor profiles on the smart contract. For this feature, a GitHub OAuth
app is required and the OAuth grant config variables must be
set.
Point a GitHub organization webhook to the following URL:
https://your-hubot.example.com/incoming/kredits/github/{webhook_token}
| Key | Description |
|---|---|
KREDITS_GITHUB_REPO_BLACKLIST | Repos which you do not want to issue kredits for. Format: orgname/reponame, e.g. 67P/test-one-two |
KREDITS_GITHUB_KEY | Key of the GitHub OAuth app used to authenticate contributors |
KREDITS_GITHUB_SECRET | Secret of the GitHub OAuth app used to authenticate contributors |
The Gitea integration will watch for closed issues and merged pull requests,
which carry a kredits label: kredits-1, kredits-2, kredits-3 for small,
medium and large contributions. If there are multiple people assigned, it will
issue contribution tokens for all of them.
Point a Gitea organization webhook to the following URL:
https://your-hubot.example.com/incoming/kredits/gitea/{webhook_token}
| Key | Description |
|---|---|
KREDITS_GITEA_REPO_BLACKLIST | Repos which you do not want to issue kredits for. Format: orgname/reponame, e.g. kosmos/test-one-two |
The MediaWiki integration will periodically check for wiki page creations and edits. It will create kredits contribution tokens based on amount of text added.
No setup needed, except for configuring the wiki URL. The bot will poll your wiki's API on its own.
| Key | Description |
|---|---|
KREDITS_MEDIAWIKI_URL | Your wiki URL, e.g. https://wiki.kosmos.org/ |
The Zoom integration creates contributions for meeting participations.
Every meeting that is longer than 15 minutes and with more than 2 participants will be registered. An optional meeting whitelist can be configured to create contributions only for specific meetings.
A Zoom JWT app has to be set up and an event webhook subscription
on meeting.ended has to be configured to the following URL:
https://your-hubot.example.com/incoming/kredits/zoom/{webhook_token}
| Key | Description |
|---|---|
KREDITS_ZOOM_JWT | The JWT for the Zoom application (required) |
KREDITS_ZOOM_MEETING_WHITELIST | Comma separated list of meeting names for which kredits should be tracked (optional) |
KREDITS_ZOOM_CONTRIBUTION_AMOUNT | The amount of kredits issued for each meeting. (default: 500) |
FAQs
Kosmos Kredits functionality for chat bots
We found that hubot-kredits demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.