{"id":42272130,"url":"https://github.com/genert/slack-integration","last_synced_at":"2026-01-27T07:27:21.440Z","repository":{"id":51392882,"uuid":"138200440","full_name":"genert/slack-integration","owner":"genert","description":" Package for sending slack messages and retrieving Git repository's user info.","archived":false,"fork":false,"pushed_at":"2023-12-15T02:25:01.000Z","size":25,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-17T00:56:57.522Z","etag":null,"topics":["git","nodejs","slack"],"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/genert.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-21T17:14:25.000Z","updated_at":"2019-07-22T10:27:36.000Z","dependencies_parsed_at":"2024-10-04T01:45:33.320Z","dependency_job_id":null,"html_url":"https://github.com/genert/slack-integration","commit_stats":{"total_commits":8,"total_committers":4,"mean_commits":2.0,"dds":0.5,"last_synced_commit":"b70718bb66278451b14228ffab8c698865315d68"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/genert/slack-integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genert%2Fslack-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genert%2Fslack-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genert%2Fslack-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genert%2Fslack-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genert","download_url":"https://codeload.github.com/genert/slack-integration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genert%2Fslack-integration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28808006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:14:39.408Z","status":"ssl_error","status_checked_at":"2026-01-27T07:14:39.098Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["git","nodejs","slack"],"created_at":"2026-01-27T07:27:20.801Z","updated_at":"2026-01-27T07:27:21.435Z","avatar_url":"https://github.com/genert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slack integration for NodeJS\n\nPackage for sending slack messages and retrieving Git repository's user info.\n\n\u003e This package is not compiled to ES5 and therefore requires Promise, and async/await support.\n\n## Installation\n```\nnpm i slack-integration\n```\n\n## Setup\n**Do not share Slack token in public code repositories.**\n\nGenerate legacy API token here for your Slack team: https://api.slack.com/custom-integrations/legacy-tokens\n\nThen initialize this package's exported class with generated token as first argument:\n```javascript\nimport Slack from 'slack-integration';\n\nconst token = 'XXXXXX';\nconst slackIntegration = new Slack(token);\n```\n\nOnce initialized, you can access following methods:\n\n### send(message: Object): Promise\nThis methods allows you send a message in your Slack workspace.\n\nSee https://api.slack.com/methods/chat.postMessage for arguments and result response.\n\nExample:\n```javascript\nslackIntegration.send({\n    channel: 'channel id here',\n    as_user: false,\n    username: 'Your Slack',\n    text: 'Hello, its me!',\n})\n    .then((result) =\u003e console.log(result))\n    .catch((err) =\u003e console.error(err));\n```\n\n### getCurrentGitUser(): Promise\nThis methods returns Promise, when resolved, an object with keys: \"name\", and \"email\" are returned.\n\nOn error, it will be rejected.\n\nIt runs following commands in the working directory:\n```bash\ngit config user.name\ngit config user.email\n```\n\nExample:\n```javascript\nslackIntegration.getCurrentGitUser()\n    .then((result) =\u003e console.log(result)) // { name: 'Git user name', email: 'Git user email' }\n    .catch((err) =\u003e console.error(err));\n```\n\n### getUsers(): Promise\nThis methods returns a list of found users in your Slack workspace.\n\nSee https://api.slack.com/methods/users.list for more information on response.\n\nExample:\n```javascript\nslackIntegration.getUsers()\n    .then((result) =\u003e console.log(result))\n    .catch((err) =\u003e console.error(err));\n```\n\n### findUser(properties: Object): Promise\nYou can search your Slack workspack users by following properties object:\n```json\n{\n    \"email\": \"search-this-email@email.com\",\n    \"name\": \"or find this user with such name\"\n}\n```\n\nIt tries to search by both, whatever it finds first, will be user that will be resolved.\n\nExample:\n```javascript\nslackIntegration.findUser({\n    email: 'some-slace-workspace-user@email.com',\n})\n    .then((result) =\u003e console.log(result))\n    .catch((err) =\u003e console.error(err));\n```\n\n## Contributions \u0026 Issues\nContributions are welcome. Please clearly explain the purpose of the PR and follow the current style.\n\nIssues can be resolved quickest if they are descriptive and include both a reduced test case and a set of steps to reproduce.\n\n## Licence\nThe `slack-integration` library is copyright © [Genert Org](http://genert.org) and licensed for use under the MIT License (MIT).\n\nPlease see [MIT License](LICENSE) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenert%2Fslack-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenert%2Fslack-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenert%2Fslack-integration/lists"}