{"id":16696953,"url":"https://github.com/seratch/slack-daily-standup-ja","last_synced_at":"2026-05-06T00:36:20.519Z","repository":{"id":232586926,"uuid":"731944202","full_name":"seratch/slack-daily-standup-ja","owner":"seratch","description":"デイリースクラム（Slack スタンダードワークフロー）","archived":false,"fork":false,"pushed_at":"2023-12-15T08:57:36.000Z","size":222,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T03:12:12.543Z","etag":null,"topics":["automation","deno","slack","typescript"],"latest_commit_sha":null,"homepage":"https://qiita.com/seratch/items/27b33d82c96d715f59cd","language":"TypeScript","has_issues":false,"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/seratch.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":"2023-12-15T08:55:32.000Z","updated_at":"2023-12-16T01:14:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6f900c8-f4bd-4d60-87b6-9917abe019c0","html_url":"https://github.com/seratch/slack-daily-standup-ja","commit_stats":null,"previous_names":["seratch/slack-daily-standup-ja"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/seratch/slack-daily-standup-ja","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Fslack-daily-standup-ja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Fslack-daily-standup-ja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Fslack-daily-standup-ja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Fslack-daily-standup-ja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seratch","download_url":"https://codeload.github.com/seratch/slack-daily-standup-ja/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Fslack-daily-standup-ja/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280958238,"owners_count":26420235,"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-25T02:00:06.499Z","response_time":81,"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":["automation","deno","slack","typescript"],"created_at":"2024-10-12T17:45:25.078Z","updated_at":"2025-10-25T12:46:14.966Z","avatar_url":"https://github.com/seratch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## デイリースクラム（Slack スタンダードワークフロー）\n\nこのリポジトリは、毎朝のデイリースクラムのためのスタンダードワークフローを CLI で開発・管理する例を示すサンプルです。\n\n\u003cimg src=\"https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/19163/026a779a-4d58-892b-059d-1534b5605ce6.png\" width=600/\u003e\n\nこのアプリは、二つのスタンダードワークフローの組み合わせで構成されています。\n\n* **リマインダー**: 平日の朝、リマインダーのチャンネルメッセージを送信するワークフロー (`workflows/morning_reminder.ts`)\n* **フォーム送信**: アップデートを投稿するためのフォームを提供するワークフロー (`workflows/share_updates.ts`)\n\nこれらを有効にするためには、いくつかの手順があるので、順を追って説明します。\n\n## アプリをデプロイ\n\n`slack deploy` コマンドで初回デプロイを実行します。「実行中にトリガーをつくるか？」と聞かれるので、その場合は `triggers/share_updates.ts` を指定して作成します。それをスキップした場合や、作り直す場合は `slack trigger create --trigger-def triggers/share_updates.ts` というコマンドでいつでも作成できます。\n\n```\n$ slack deploy\n? Choose a deployed environment Install to a new team\n? Install to a new team seratch T03E94MJU\n\n🔔 If you leave this team, you can no longer manage the installed apps\n   Installed apps will belong to the team if you leave the workspace\n\n📚 App Manifest\n   Created app manifest for \"Daily Standup\" in \"Acme Corp\"\n\n🏠 App Install\n   Installing \"Daily Standup\" app to \"Acme Corp\"\n   Updated app icon: assets/icon.png\n   Finished in 5.4s\n\n⚡ Listing triggers installed to the app...\n   There are no triggers installed for the app\n\n⚡ Create a trigger\n   Searching for trigger definition files under 'triggers/*'...\n   Found 3 trigger definition files\n\n? Choose a trigger definition file: triggers/share_updates.ts\n\n⚡ Trigger successfully created!\n\n   デイリースタンドアップでアップデートを共有 Ft06A42JJJ14 (shortcut)\n   Created: 2023-12-15 16:51:18 +09:00 (1 second ago)\n   Collaborators:\n     Kaz Sera @seratch U03E94MK0\n   Can be found and used by:\n     everyone in the workspace\n   https://slack.com/shortcuts/Ft06A42JJJ14/....\n\n🎁 App packaged and ready to deploy\n   0.002MB was packaged in 0.3s\n\n🚀 Daily Standup deployed in 9.1s\n   App Owner:  seratch (U03E94MK0)\n   Workspace:  Acme Corp (T03E94MJU)\n   Dashboard:  https://slack.com/apps/A06AAJ.....\n\n🌩  Visit Slack to try out your live app!\n   When you make any changes, update your app by re-running slack deploy\n\n💌 We would love to know how things are going\n   Survey your development experience with slack feedback --name platform-improvements\n```\n\n## 設定の変更\n\n次にリマインダーの方のワークフローに 3 つほど設定をします。\n\n`triggers/morning_reminder.ts` を開いて `trigger.schedule.start_time` を初回実行の日時に設定します。`start_time` の値は未来の日時でなければならないことに注意してください。\n\n\u003cimg src=\"https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/19163/82a08c35-17f7-9af3-8e73-24e489588e54.png\" width=600/\u003e\n\nUTC での日時として設定する場合、以下のようにして翌日 9 時の値を取得することができます（9 時間マイナスすればよいだけではありますが）。日本の標準時で設定してもよいと思います。\n```bash\n# macOS: \ndate -v09H -v00M -v00S -v+1d +%s | xargs date -u -Iseconds -r\n# Linux:\ndate -u -d 'TZ=\"Asia/Tokyo\" 09:00 tomorrow'\n```\n\n次に `workflows/morning_reminder.ts` を開いて、二点変更します。\n\n`TODO: 以下のコマンドで生成されたものに差し替え` と書かれている URL を先ほど生成した URL に差し替えます。もう一つは `TODO: インストール先の実際のチャンネル ID に差し替え` と書かれているチャンネルの ID を差し替えます。\n\n\u003cimg src=\"https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/19163/c2c0081d-d793-82a9-d9f3-a4f0b7bd8a04.png\" width=600/\u003e\n\nチャンネルの ID はメッセージの URL で `https://xxx.slack.com/archives/CHE2DUW5V/p1702627198119329` となっているところの `CHE2DUW5V` です。あとはチャンネル名をクリックすると開くポップアップモーダルを一番下までスクロールすると、そこにも表示されています。\n\n\u003cimg src=\"https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/19163/ba581978-a931-b45a-ad35-1e6d40d1db15.png\" width=400/\u003e\n\nこれでソースコードの変更は完了です。変更内容を反映するためにもう一度 `slack deploy` を実行してください。\n\n## 動作確認用\n\nそれが終わったら次は動作確認のためのトリガーを作成します。 `slack trigger create --trigger-def triggers/morning_reminder_test.ts` を実行し、生成された URL をワークフローを動かしたいチャンネルで共有します。\n\nそれをクリックすると以下のように朝のリマインダーが送信されるはずなので、そのままテスト投稿してみましょう。\n\n\u003cimg src=\"https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/19163/9dc346a5-1bfe-a97b-9a3b-3232dce5e9da.png\" width=400\u003e\n\nモーダルダイアログで質問への回答を入力し、\n\n\u003cimg src=\"https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/19163/f0c3167a-b455-de5f-8c2e-982fe4b7493b.png\" width=400/\u003e\n\n送信すると、このようにスレッドに内容が反映されます。\n\n\u003cimg src=\"https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/19163/026a779a-4d58-892b-059d-1534b5605ce6.png\" width=400/\u003e\n\n問題なさそうです。最後に本番のスケジュールトリガーを `slack trigger create --trigger-def triggers/morning_reminder.ts` で作成したら準備完了です。\n\n## さらにカスタマイズする方法\n\nもし文言などカスタマイズしたいところがあれば、コードを変更して手動テストをした上で `slack deploy` するだけで OK です。\n\nトリガーの作り直しは基本的には必要ないですが、リマインダーを送りたいチャンネルを変更するときは埋め込んであるチャンネル ID を書き換えてから `slack trigger create --trigger-def triggers/morning_reminder.ts` で新しいものを生成し、古いものは `slack trigger delete --trigger-id [ここにトリガーの ID を指定]` で削除します。あとはトリガーの name, description などを変更したい場合にも再作成が必要となります。\n\n## デプロイの自動化\n\nGitHub でコードを管理する前提として、GitHub Actions を使って自動デプロイできるようにしておきましょう。 `.github/workflows/deploy.yml` というファイルを作って、以下の内容で保存します。\n\n```yaml\nname: Deploy to my Slack workspace\non:\n  push:\n    branches: [ main ]\njobs:\n  build:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    steps:\n    - uses: actions/checkout@v4\n    - name: Install Deno runtime\n      uses: denoland/setup-deno@v1\n      with:\n        deno-version: v1.x\n    - name: Install Slack CLI\n      run: |\n        curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash\n    - name: Deploy the app\n      env:\n        SLACK_SERVICE_TOKEN: ${{ secrets.SLACK_SERVICE_TOKEN }}\n      run: |\n        slack deploy -s --token $SLACK_SERVICE_TOKEN\n```\n\n上の定義に出てくる `secrets.SLACK_SERVICE_TOKEN` を設定します。\n\nターミナルに戻って `slack auth token` を実行して `slack login` と同様に Slack ワークスペース内で `/slackauthticket` を実行して完了すると `xoxp-3485157640-...` のようなトークンが発行されます。これを `SLACK_SERVICE_TOKEN` として設定するだけです。\n\nGithub リポジトリを作成したら、Settings \u003e Security \u003e Secrets and variables \u003e Actions から \"Add repository secret\" で設定します。\n\n\u003cimg src=\"https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/19163/99eb8ff2-583a-3805-c038-771db3fc6052.png\" width=400/\u003e\n\n以上で、全ての準備が完了です。GitHub リポジトリに全てのファイルを push してみてください。以下の通り、自動デプロイされれば OK です。\n\n\u003cimg src=\"https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/19163/d0860846-c61d-5648-5fce-dcb7a3da6177.png\" width=400/\u003e\n\n以上です。このリポジトリで紹介したワークフローの管理方法自体は、プレミアムワークフローでも同様です。もし将来このワークフローをより進化させるためにカスタムステップを実装することになった場合にも、このリポジトリのまま移行できるでしょう。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseratch%2Fslack-daily-standup-ja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseratch%2Fslack-daily-standup-ja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseratch%2Fslack-daily-standup-ja/lists"}