{"id":20327718,"url":"https://github.com/cainelli/stargazers-slack","last_synced_at":"2026-04-29T12:40:03.097Z","repository":{"id":149533526,"uuid":"101701568","full_name":"cainelli/stargazers-slack","owner":"cainelli","description":":star2: A StdLib serverless function to notify GitHub Stargazers to Slack","archived":false,"fork":false,"pushed_at":"2017-08-31T23:48:15.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T14:57:43.173Z","etag":null,"topics":["github","serverless","slack","star","stargazer","stdlib"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cainelli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-08-29T00:47:22.000Z","updated_at":"2020-04-16T21:52:03.000Z","dependencies_parsed_at":"2023-04-19T05:18:37.280Z","dependency_job_id":null,"html_url":"https://github.com/cainelli/stargazers-slack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cainelli%2Fstargazers-slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cainelli%2Fstargazers-slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cainelli%2Fstargazers-slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cainelli%2Fstargazers-slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cainelli","download_url":"https://codeload.github.com/cainelli/stargazers-slack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241844286,"owners_count":20029611,"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":["github","serverless","slack","star","stargazer","stdlib"],"created_at":"2024-11-14T19:48:36.968Z","updated_at":"2025-12-02T12:03:51.501Z","avatar_url":"https://github.com/cainelli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StdLib Stargazers :star2: Slack\n\nThis is a [stdlib](https://stdlib.com) serverless function which recieves GitHub stars events and sends it to a [Slack](https://slack.com) channel.\n\nhttps://www.useloom.com/share/881f7f3d6ed0437e8afab257374fd41d\n\n## Slack\n \nLogin into your Slack account to configure a new [app](https://slack.com/apps). Search for `Incoming WebHooks` and then click in **Add Configuration**.\n\n\u003cimg width=\"1679\" alt=\"slack search apps\" src=\"https://user-images.githubusercontent.com/3514984/29948735-f99231ee-8e86-11e7-8f0d-8b5f1441eb8c.png\"\u003e\n\nChoose a channel where the notifications will arrive and confirm it clicking in **Add Incoming WebHooks integration**.\n\n\u003cimg width=\"1678\" alt=\"add incoming webhooks\" src=\"https://user-images.githubusercontent.com/3514984/29948774-2b2b2f08-8e87-11e7-8644-60e213c4d79e.png\"\u003e\n\n\nCopy the **Webhook URL**, you will use it later in the app configuration. Click in **Save Settings**.\n\n\u003cimg width=\"1004\" alt=\"config incoming webhooks\" src=\"https://user-images.githubusercontent.com/3514984/29948834-7f734ef6-8e87-11e7-94f3-f6d756be7629.png\"\u003e\n\n## StdLib\n\nYou need an __stdlib__ account and its CLI.\n\nIf you don’t have Node.js installed, download version v8.4.x or higher from the Node.js website. Once complete, open up your terminal and install the StdLib CLI.\n\n```bash\n$ npm install lib.cli -g\n```\n\n\nWe need to create a directory for your StdLib services and initialize a workspace — you’ll be asked to log in with the account you already registered.\n\n```bash\n$ mkdir stdlib\n$ cd stdlib\n$ lib init\n```\n\nOnce your workspace is initialized, you’re ready to create your StdLib service. Clone the repository \n\n```bash\n$ STDLIB_USER=$(lib user | grep username | awk '{print $2}')\n$ git clone https://github.com/cainelli/stargazers-slack.git $STDLIB_USER/stargazers-slack\n```\n\nUpdate the `env.json` file with the proper information.\n\n```json\n{\n  \"local\": {},\n  \"dev\": {\n    \"SLACK_WEBHOOK_URL\": \"https://hooks.slack.com/services/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\",\n    \"GITHUB_SECRET\": \"secret\"\n  },\n  \"release\": {\n    \"SLACK_WEBHOOK_URL\": \"https://hooks.slack.com/services/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\",\n    \"GITHUB_SECRET\": \"secret\"\n  }\n}\n```\n\nFinally you can start your dev environment running:\n\n```bash\n$ lib up dev\n...\n(default function)\n------------------\nurl:      https://cainelli.lib.id/stargazers-slack@dev/\ncode:     lib.cainelli.stargazers-slack['@dev']()\nshell:    lib cainelli.stargazers-slack[@dev]\ncontext:  (enabled)\nbg:       info\n```\n\nThe url above we will use to create GitHub webhook.\n\n## GitHub\n\nGo to the **Settings** of your project repository and then **Webhooks** and click in **Add Webhook**. Configure as following:\n\n**Payload URL:** The URL above from the output of `lib up dev`.\n\n**Content type:** application/json.\n\n**Secret:** The `GITHUB_SECRET` environment variables defined in `env.json` file.\n\n**Let me select individual events:** watch, fork.\n\n\u003cimg width=\"1678\" alt=\"github webhook integration\" src=\"https://user-images.githubusercontent.com/3514984/29948902-c84ab998-8e87-11e7-90b3-cdd4629cffe3.png\"\u003e\n\n\nOnce you created the webhook you can :star2: star your repository and check on your Slack channel.\n\n\n\u003cimg width=\"1379\" alt=\"screen shot 2017-08-31 at 19 51 27\" src=\"https://user-images.githubusercontent.com/3514984/29948923-dc682776-8e87-11e7-9577-7239acb9fed6.png\"\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcainelli%2Fstargazers-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcainelli%2Fstargazers-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcainelli%2Fstargazers-slack/lists"}