{"id":31565767,"url":"https://github.com/correlaid/correlaid-slackbot-js","last_synced_at":"2025-10-05T07:17:28.513Z","repository":{"id":40708257,"uuid":"241578089","full_name":"CorrelAid/correlaid-slackbot-js","owner":"CorrelAid","description":"re-implemenation of the CorrelAid Slackbot in Javascript with AWS Lambda and the serverless framework.","archived":false,"fork":false,"pushed_at":"2023-01-09T22:26:53.000Z","size":2990,"stargazers_count":0,"open_issues_count":22,"forks_count":0,"subscribers_count":9,"default_branch":"main","last_synced_at":"2023-07-14T13:33:50.296Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/CorrelAid.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":"2020-02-19T09:10:49.000Z","updated_at":"2023-07-14T13:33:50.297Z","dependencies_parsed_at":"2023-02-08T15:00:23.729Z","dependency_job_id":null,"html_url":"https://github.com/CorrelAid/correlaid-slackbot-js","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/CorrelAid/correlaid-slackbot-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Fcorrelaid-slackbot-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Fcorrelaid-slackbot-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Fcorrelaid-slackbot-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Fcorrelaid-slackbot-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CorrelAid","download_url":"https://codeload.github.com/CorrelAid/correlaid-slackbot-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Fcorrelaid-slackbot-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278421863,"owners_count":25984081,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-05T07:17:25.390Z","updated_at":"2025-10-05T07:17:28.504Z","avatar_url":"https://github.com/CorrelAid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# correlaid-slackbot-js :robot:\n\nRe-implemenation of the CorrelAid Slackbot *CorrelBot* in Node.js with AWS Lambda and the [serverless](https://serverless.com) framework.\n\n### Current features\n- /telko slash command: post simple \"poll\" or show details for the core team call\n- /projectupdate slash command: post summary of the [projects Kanban board](https://github.com/CorrelAid/projects/projects/1)\n- automated project update: posts summary of the [projects Kanban board](https://github.com/CorrelAid/projects/projects/1) every Monday to the #projects channel.\n- comment under links from domain pad.correlaid.org to remind people how they can get access\n- comment under links from domain hackmd.io that we have transitioned to pad.correlaid.org and that the content should be transferred there.\n\n### Deprecated features\nThe bot also used to send welcome messages to new members of the workspace. This is now replaced by a [Slack workflow](https://slackhq.com/automate-tasks-in-slack-with-workflow-builder).\n\n# Development\n## install\n\ninstall nodejs dependencies:\n\n```\nyarn install\n```\n\n## test\n\n```\nyarn test\n```\n\n## lint \nso far, only code formatting via `prettier` is implemented. To run:\n\n```\nyarn lint\n```\n\n# Deployment to AWS\n\n## Requirements\n\n### env.yml\nYou need a `yml` file in the root folder with the environment variables for the application. The file name should follow `env_{stage}.yml`, depending on to which stage you want to deploy to. Examples:\n\n- `.env_dev.yml`\n- `.env_prod.yml`\n\nThe variables are (used in `serverless.yml`):\n\n- `SLACK_API_TOKEN`: the \"Bot User Oauth Access Token\" of the CorrelBot Slack App. You can find it on the \"OAuth \u0026 Permissins\" subpage of the CorrelBot Slack App page (only accessible with the suitable permissions for the CorrelAid workspace).\n- `SLACK_SIGNING_SECRET`: the signing secret that slack uses to generate the [signature header](https://api.slack.com/docs/verifying-requests-from-slack). You can find it on the \"Basic Information\" page of the CorrelBot Slack App (only accessible with the suitable permissions for the CorrelAid workspace).\n- `SLACK_PROJECTS_CHANNEL`: ID of channel where the automated project update should be posted each Monday morning.\n- `GITHUB_PAT`: Github personal access token (PAT) from a user with write access to the `CorrelAid/projects` repository.\n- `GITHUB_OWNER`: owner of the repository. In this case, \"correlaid\". \n- `GITHUB_REPO`: name of repository. In this case, \"projects\".\n- `GITHUB_PROJECT_ID`: ID of the \"projects\" project in GitHub.\n\nCheck `env_template.yml` for how the `env_{stage}.yml` file should look like and generate it accordingly.\n\n### aws credentials\n\nYou need to have set up your aws credentials. See [this guide](https://serverless.com/framework/docs/providers/aws/guide/credentials/).\n\n### serverless\n\nYou need to have serverless installed.\nFind the installation instructions [here](https://serverless.com/framework/docs/getting-started/).\n\n## Deploy\n\n### dev\n\nYou can deploy the service to the dev stage AWS Lambda with the following command:\n\n```\nserverless deploy --aws-profile yourprofilename\n```\n\nwhere `yourprofilename` is the AWS profile you generated earlier when setting up the AWS credentials (e.g. \"default\").\n\n### prod\n\n```\nserverless deploy --aws-profile yourprofilename --stage prod\n```\n\n## Configure app endpoints in Slack\n\nThe two `endpoints` that are shown in the serverless output are the ones that need to be put in the [slack app configuration](https://api.slack.com/apps/):\n\n- POST endpoint ending in `slack-slash` is for the slash command:\n  - go to subpage \"Slash commands\"\n  - create slash command if not there\n  - under request URL put the POST endpoint\n- POST endpoint ending in `slack-events` is for the CorrelBot that reacts to the hackmd messages\n  - go to subpage \"event subscriptions\"\n  - under \"subscribe to workspace events\", subscribe to the `link_shared` event\n  - under request URL put the POST endpoint\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrelaid%2Fcorrelaid-slackbot-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorrelaid%2Fcorrelaid-slackbot-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrelaid%2Fcorrelaid-slackbot-js/lists"}