{"id":13877961,"url":"https://github.com/thoughtbot/gold_miner","last_synced_at":"2025-08-22T12:44:11.689Z","repository":{"id":66022056,"uuid":"531308612","full_name":"thoughtbot/gold_miner","owner":"thoughtbot","description":"Searches for interesting messages in a Slack channel and creates a blog post with them. See https://thoughtbot.com/blog/tags/this-week-in-dev","archived":false,"fork":false,"pushed_at":"2025-04-01T18:06:16.000Z","size":264,"stargazers_count":39,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T19:25:26.313Z","etag":null,"topics":["hacktoberfest","openai","ruby","slack"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/thoughtbot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"thoughtbot"}},"created_at":"2022-09-01T00:41:29.000Z","updated_at":"2025-04-01T18:06:18.000Z","dependencies_parsed_at":"2024-04-08T16:40:59.844Z","dependency_job_id":"00099724-862d-478b-bc26-3fac579a8c1c","html_url":"https://github.com/thoughtbot/gold_miner","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/thoughtbot%2Fgold_miner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fgold_miner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fgold_miner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fgold_miner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoughtbot","download_url":"https://codeload.github.com/thoughtbot/gold_miner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154921,"owners_count":21544571,"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":["hacktoberfest","openai","ruby","slack"],"created_at":"2024-08-06T08:01:36.079Z","updated_at":"2025-08-22T12:44:11.631Z","avatar_url":"https://github.com/thoughtbot.png","language":"Ruby","readme":"# ⛏ GoldMiner\n\nGoldMiner is a tool for finding interesting\\* messages in a Slack channel and\nturning them into a blog post for the [thoughtbot blog].\n\nIt uses the Slack API to [search for messages in a channel], then it groups and\n[formats them into a markdown blog post].\n\n_\\* At this point, \"interesting\" means \"messages that contain 'TIL', 'tip' or\nhave been reacted with the :rupee-gold: emoji\"._\n\n[thoughtbot blog]: https://thoughtbot.com/blog\n[search for messages in a channel]: https://github.com/thoughtbot/gold_miner/blob/main/lib/gold_miner/slack/client.rb#L34\n[formats them into a markdown blog post]: https://github.com/thoughtbot/gold_miner/blob/main/lib/gold_miner/blog_post.rb#L14\n\n## Installation\n\nFirst, clone the repo:\n\n```sh\ngit clone git@github.com:thoughtbot/gold_miner.git\n```\n\nThen, run the setup script:\n\n```sh\nbin/setup\n```\n\nYou'll need a Slack API token. You can get it [on 1Password] (search for \"Slack\nAPI Token\"). If that doesn't work, ask [someone on the team] for help.\n\n[on 1password]: https://start.1password.com/signin\n[someone on the team]: https://thoughtbot.slack.com/apps/A040W2T48BF-gold-miner?tab=more_info\n\nAlternatively, see the \"Register your own app with Slack\" section below for the\nsteps to create your own app and User Token.\n\nAfter setting the token on the `.env` file, rerun the setup script to finish the\ninstallation.\n\n### Setup OpenAI (optional)\n\nIf you'd like the help of an AI to generate a blog post, you can set the\n`OPEN_AI_API_TOKEN` environment variable. To get one, create an account and\ngenerate a token on the [OpenAI website](https://openai.com/api).\n\n## Usage\n\nTo generate a blog post, run the following command:\n\n```sh\nexe/gold_miner\n```\n\nGoldMiner will search on the #dev channel by default. You can also specify a\ndifferent channel:\n\n```sh\n# Search on the #design channel\nexe/gold_miner design\n```\n\nThis will output a markdown article. Use that as a basis for opening a [new blog\npost PR].\n\n\u003e **Note**\n\u003e In the future, GoldMiner [will open] a PR for you.\n\n[new blog post pr]: https://vellum.thoughtbot.com/articles/new\n[will open]: https://github.com/thoughtbot/gold_miner/issues/1\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run\n`rake spec` to run the tests. You can also run `bin/console` for an interactive\nprompt that will allow you to experiment.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/thoughtbot/gold_miner.\n\n## Register your own app with Slack\n\nTo register an app with Slack you just need to give it a name and select a\nworkspace to develop it. After that, you will be able to generate Bot and User\nTokens from your App settings page. A User Token is needed instead of a\nBot Token because Gold Miner uses Slack's [search.messages] API which is only\navailable for User Tokens.\n\n- Go to https://api.slack.com/apps and click on \"Create New App\"\n  and then click \"From scratch\"\n- Give it a name, select your workspace, and click \"Create App\"\n- After that, go to \"Add features and functionality \u003e Permissions\"\n- Scroll down to \"Scopes \u003e User Token Scopes\" and give your app the\n  following scopes:\n  - `search:read` to have access to [search.messages]\n  - `users:read` to have access to [users.info]\n- Then scroll back up to \"OAuth Tokens for Your Workspace\"\n  and click \"Install to Workspace\"\n- You will be redirected to a page asking you to allow your app to be\n  installed to the workspace and listing the scopes/permissions you've selected\n- Click \"Allow\"\n\n[search.messages]: https://api.slack.com/methods/search.messages\n[users.info]: https://api.slack.com/methods/users.info\n\nNow you have your personal app installed to the workspace and with Bot and User\nTokens generated.\n\nGo back to your App settings page, click \"Add features and functionality \u003e\nPermissions\", then copy the \"User OAuth Token\" and set it to `SLACK_API_TOKEN`\nin your `.env` file.\n\n\u003c!-- START /templates/footer.md --\u003e\n## About thoughtbot\n\n![thoughtbot](https://thoughtbot.com/thoughtbot-logo-for-readmes.svg)\n\nThis repo is maintained and funded by thoughtbot, inc.\nThe names and logos for thoughtbot are trademarks of thoughtbot, inc.\n\nWe love open source software!\nSee [our other projects][community].\nWe are [available for hire][hire].\n\n[community]: https://thoughtbot.com/community?utm_source=github\n[hire]: https://thoughtbot.com/hire-us?utm_source=github\n\n\u003c!-- END /templates/footer.md --\u003e\n","funding_links":["https://github.com/sponsors/thoughtbot"],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbot%2Fgold_miner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtbot%2Fgold_miner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbot%2Fgold_miner/lists"}