{"id":26716598,"url":"https://github.com/67p/hubot-kredits","last_synced_at":"2025-03-27T15:38:00.175Z","repository":{"id":53451248,"uuid":"80813068","full_name":"67P/hubot-kredits","owner":"67P","description":"Kosmos Kredits chat/service integrations","archived":false,"fork":false,"pushed_at":"2023-08-14T15:31:16.000Z","size":915,"stargazers_count":2,"open_issues_count":9,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-03-15T03:34:44.385Z","etag":null,"topics":["hubot","hubot-scripts","kosmos","kredits","rootstock","rsk","web3"],"latest_commit_sha":null,"homepage":"https://wiki.kosmos.org/Kredits","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/67P.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-03T08:58:45.000Z","updated_at":"2023-03-11T09:25:18.000Z","dependencies_parsed_at":"2023-02-10T21:00:54.514Z","dependency_job_id":null,"html_url":"https://github.com/67P/hubot-kredits","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/67P%2Fhubot-kredits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/67P%2Fhubot-kredits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/67P%2Fhubot-kredits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/67P%2Fhubot-kredits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/67P","download_url":"https://codeload.github.com/67P/hubot-kredits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245873092,"owners_count":20686531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hubot","hubot-scripts","kosmos","kredits","rootstock","rsk","web3"],"created_at":"2025-03-27T15:37:55.751Z","updated_at":"2025-03-27T15:38:00.158Z","avatar_url":"https://github.com/67P.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/@kredits/hubot-kredits.svg)](https://www.npmjs.com/package/@kredits/hubot-kredits)\n\n# Hubot Kredits\n\nThis repository provides scripts for integrating [Kosmos\nKredits](https://wiki.kosmos.org/Kredits) in [Hubot](http://hubot.github.com/)\nchatbots. The bot will watch for project-related things happening on the\nInternet and automatically create ERC721 tokens for issuing kredits for project\ncontributions.\n\n## Setup\n\n### Wallet\n\nYou will need a keypair/wallet for your bot, so it can interact with the smart\ncontracts. `npm run create-wallet` will do the job for you.\n\nThe wallet must be funded with enough native chain tokens to interact with the\ncontracts (i.e. it must be able to pay gas/tx fees)\n\n### Contract permissions\n\n**Warning: outdated instructions!**\n\n*TODO adapt instructions for new permission model*\n\nThe bot wallet needs the following Aragon contract permissions to interact\nwith [kredits-contracts]:\n\n1. `ADD_CONTRIBUTION_ROLE` on the `Contribution` contract\n2. `MANAGE_CONTRIBUTORS_ROLE` on the `Contributor` contract\n\nThese permissions can be configured using the [Aragon\nCLI](https://hack.aragon.org/docs/cli-intro.html) (see [kredits-contracts].\n\n    aragon dao acl grant [DAO address] [contribution app address] ADD_CONTRIBUTION_ROLE [bot wallet address]\n    aragon dao acl grant [DAO address] [contributor app address] MANAGE_CONTRIBUTORS_ROLE [bot wallet address]\n\nTo get the `Contribution` and `Contributor` app addresses use `aragon dao apps`.\n\n## Configuration\n\nAs usual in Hubot, you can add all config as environment variables.\n\n| Key | Description |\n| --- | --- |\n| `KREDITS_WEBHOOK_TOKEN` | A string for building your secret webhook URLs |\n| `KREDITS_ROOM` | The bot will talk to you in this room |\n| `KREDITS_WALLET_PATH` | Path to an wallet JSON file (default: `./wallet.json`) |\n| `KREDITS_WALLET_PASSWORD` | Wallet password |\n| `KREDITS_PROVIDER_URL` | JSON-RPC URL of a blockchain node (default: `http://localhost:7545`) |\n| `KREDITS_WEB_URL` | URL of the Kredits Web app (default: `https://kredits.kosmos.org`) |\n| `KREDITS_SESSION_SECRET` | Secret used by [grant](https://www.npmjs.com/package/grant) to sign the session ID |\n| `KREDITS_GRANT_HOST` | Host used by [grant](https://www.npmjs.com/package/grant) to generate OAuth redirect URLs (default: `localhost:8888`) |\n| `KREDITS_GRANT_PROTOCOL` | Protocol (http or https) used by [grant](https://www.npmjs.com/package/grant\") to generate the OAuth redirect URLs (default: \"http\") |\n\n## Integrations\n\n### GitHub\n\nThe GitHub integration will watch for closed issues and merged pull requests,\nwhich carry a kredits label: `kredits-1`, `kredits-2`, `kredits-3` for small,\nmedium and large contributions. If there are multiple people assigned, it will\nissue contribution tokens for all of them.\n\nIf `KREDITS_GITHUB_KEY` and `KREDITS_GITHUB_SECRET` are set, the bot will also\nexpose OAuth endpoints to authenticate new contributors and register new\ncontributor profiles on the smart contract. For this feature, a [GitHub OAuth\napp] is required and the [OAuth grant config variables](#Configuration) must be\nset.\n\n#### Setup\n\nPoint a GitHub organization webhook to the following URL:\n\n    https://your-hubot.example.com/incoming/kredits/github/{webhook_token}\n\n#### Config\n\n| Key | Description |\n| --- | --- |\n| `KREDITS_GITHUB_REPO_BLACKLIST` | Repos which you do not want to issue kredits for. Format: `orgname/reponame`, e.g. `67P/test-one-two` |\n| `KREDITS_GITHUB_KEY` | Key of the [GitHub OAuth app] used to authenticate contributors |\n| `KREDITS_GITHUB_SECRET` | Secret of the [GitHub OAuth app] used to authenticate contributors |\n\n### Gitea\n\nThe Gitea integration will watch for closed issues and merged pull requests,\nwhich carry a kredits label: `kredits-1`, `kredits-2`, `kredits-3` for small,\nmedium and large contributions. If there are multiple people assigned, it will\nissue contribution tokens for all of them.\n\n#### Setup\n\nPoint a Gitea organization webhook to the following URL:\n\n    https://your-hubot.example.com/incoming/kredits/gitea/{webhook_token}\n\n#### Config\n\n| Key | Description |\n| --- | --- |\n| `KREDITS_GITEA_REPO_BLACKLIST` | Repos which you do not want to issue kredits for. Format: `orgname/reponame`, e.g. `kosmos/test-one-two` |\n\n### MediaWiki\n\nThe MediaWiki integration will periodically check for wiki page creations and\nedits. It will create kredits contribution tokens based on amount of text added.\n\n#### Setup\n\nNo setup needed, except for configuring the wiki URL. The bot will poll your\nwiki's API on its own.\n\n#### Config\n\n| Key | Description |\n| --- | --- |\n| `KREDITS_MEDIAWIKI_URL` | Your wiki URL, e.g. `https://wiki.kosmos.org/` |\n\n[kredits-contracts]: https://github.com/67P/kredits-contracts\n[GitHub OAuth app]: https://developer.github.com/apps/about-apps/#about-oauth-apps\n\n\n### Zoom\n\nThe Zoom integration creates contributions for meeting participations.\n\nEvery meeting that is longer than 15 minutes and with more than 2 participants will be registered.\nAn optional meeting whitelist can be configured to create contributions only for specific meetings.\n\n\n#### Setup\n\nA Zoom JWT app has to be set up and an [event webhook subscription](https://marketplace.zoom.us/docs/api-reference/webhook-reference/meeting-events/meeting-ending\")\non `meeting.ended` has to be configured to the following URL:\n\n    https://your-hubot.example.com/incoming/kredits/zoom/{webhook_token}\n\n#### Config\n\n| Key | Description |\n| --- | --- |\n| `KREDITS_ZOOM_JWT` | The JWT for the Zoom application (required)\n| `KREDITS_ZOOM_MEETING_WHITELIST` | Comma separated list of meeting names for which kredits should be tracked (optional)\n| `KREDITS_ZOOM_CONTRIBUTION_AMOUNT` | The amount of kredits issued for each meeting. (default: 500)\n\n[Zoom apps](https://marketplace.zoom.us/user/build)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F67p%2Fhubot-kredits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F67p%2Fhubot-kredits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F67p%2Fhubot-kredits/lists"}