{"id":22600904,"url":"https://github.com/kurosame/bots-go","last_synced_at":"2025-07-23T00:33:39.249Z","repository":{"id":37798405,"uuid":"494655145","full_name":"kurosame/bots-go","owner":"kurosame","description":"Bots made with Go","archived":false,"fork":false,"pushed_at":"2025-06-29T11:19:58.000Z","size":72,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T06:42:52.396Z","etag":null,"topics":["gcp","go","golang","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","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/kurosame.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,"zenodo":null}},"created_at":"2022-05-21T02:00:38.000Z","updated_at":"2025-06-29T11:20:02.000Z","dependencies_parsed_at":"2024-03-11T03:26:56.057Z","dependency_job_id":"62668bfd-c397-4fdc-b84b-458c90aa389f","html_url":"https://github.com/kurosame/bots-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kurosame/bots-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurosame%2Fbots-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurosame%2Fbots-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurosame%2Fbots-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurosame%2Fbots-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kurosame","download_url":"https://codeload.github.com/kurosame/bots-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurosame%2Fbots-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266596942,"owners_count":23953894,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["gcp","go","golang","terraform"],"created_at":"2024-12-08T12:12:54.582Z","updated_at":"2025-07-23T00:33:39.213Z","avatar_url":"https://github.com/kurosame.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bots with Go\n\n## [Twitter RSS Filter](https://github.com/kurosame/bots-go/tree/main/bots/rss)\n\nFilter the Twitter list for RSS\n\nTo run it, create `.env` file then set the following\n\n```sh\nGOOGLE_PROJECT_ID            # GCP project id\nGOOGLE_PROJECT_NUMBER        # GCP project number\nSLACK_USER_OAUTH_TOKEN       # Slack user oauth token\nSLACK_BOT_OAUTH_TOKEN        # Slack bot oauth token\nSLACK_CHANNEL_ID_RSS         # Slack channel id (for #event-rss)\nSLACK_CHANNEL_ID_TWITTER     # Slack channel id (for #media-twitter)\nSLACK_CHANNEL_ID_TWITTER_RSS # Slack channel id (for #media-twitter-rss)\nRSSAPP_ID_TWITTER            # RSS.app id (for media-twitter)\nRSSAPP_ID_LIKE               # RSS.app id (for news-like)\n```\n\nDeploy to the Cloud Functions are as follows\n\n```sh\nmake zip\nmake apply\n```\n\n### Run manually\n\n```sh\n# Add filter keyword\ncurl -X POST \\\n-H \"Authorization: Bearer $(gcloud auth print-identity-token)\" \\\n-H \"Content-Type: application/json\" \\\nhttps://asia-northeast1-【GCP ProjectID】.cloudfunctions.net/twitter-rss-filter-add-keyword\\?kw\\=kw1,kw2,kw3\n\n# Set RSS.app token\ncurl -X POST \\\n-H \"Authorization: Bearer $(gcloud auth print-identity-token)\" \\\n-H \"Content-Type: application/json\" \\\nhttps://asia-northeast1-【GCP ProjectID】.cloudfunctions.net/twitter-rss-filter-set-token\\?token\\=token_value\n```\n\n## [JSON to Firestore](https://github.com/kurosame/json2firestore)\n\nRead jsonl file and add/update to Firestore  \nNot a generic implementation\n\n## Terraform\n\n### IAM setup for Terraform\n\nCreated a `bots-go-tf` IAM service account from the GCP Console  \n`bots-go-tf` has a owner roles of the GCP resources to attached\n\nCreate a service account key and set `GOOGLE_CREDENTIALS` in Terraform Cloud Variables  \ncredential json needs to be changed as follows\n\n```sh\ncat credential.json | tr -s '\\n' ' ' # Remove line feed code\n```\n\n### Terraform is not supported\n\nThe following resources are not supported by Terraform  \nSo create it from the GCP Console\n\n- Create a Datastore entity\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurosame%2Fbots-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkurosame%2Fbots-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurosame%2Fbots-go/lists"}