File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,15 @@ slack の過去ログを google sheet に書き出すツールです。
88- github actions で実行可能、サーバー不要
99- 公開リポジトリでセットアップ可能、トークン等の非公開情報は repository secrets に設定
1010
11+ デフォルトでは、実行日時の2か月前からの1か月分を1ファイルにします。
12+
13+ 例: 10月x日に実行すると、 8/1 ~ 8/31 分のログを取得
14+
15+ 1か月空けてあるのは、「スレッド返信はその発言元の時刻でしか取得できない」という、本システムの制限のためです。
16+ 例えば、 9/30 の投稿に対し、10/2 にスレッド返信がついたとします。
17+ この返信は、9月のログを生成する際に取得されますが、10月のログには含まれません。
18+ 10/1 に9月分を取得してしまうと、 10/2 のスレッドはどこにも記録されずに失われてしまうことになります。
19+
1120# 準備
1221
1322## slack bot の作成、 token の取得
6170
6271GOOGLE_PRIVATE_KEY はダウンロードした json の private_key の値だが、 \n を改行にあらかじめ置換してから github に登録する。
6372
73+ # オプション設定
74+ 以下のように year, month を指定すると、指定の年月のログを取得します。
75+
76+ ```
77+ - uses: kuboon/gsheet-slack-logger@main
78+ with:
79+ year: 2020
80+ month: 3
81+ ```
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ let year, month
66if ( args . length < 2 || args [ 0 ] == "" ) {
77 const now = new Date
88 year = now . getFullYear ( )
9- month = now . getMonth ( ) + 1
9+ month = now . getMonth ( ) + 1 - 2
1010} else {
1111 year = parseInt ( args [ 0 ] )
1212 month = parseInt ( args [ 1 ] )
You can’t perform that action at this time.
0 commit comments