Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

雑談会ログのissueの作成時刻を月曜日の10時に変更 #139

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/create_meeting_record.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Create Meeting Record issue
on:
schedule:
# 毎週金曜 13:00 JST
- cron: '0 4 * * fri'
# workflow_dispatch:
# 毎週月曜日 10:00 JST
- cron: '0 1 * * mon'
workflow_dispatch:
jobs:
create_issue:
runs-on: ubuntu-latest
Expand All @@ -14,6 +14,6 @@ jobs:
run: |
latest=$(gh issue list --jq '.[].title' --json title --search "雑談会 sort:created-desc" --limit 10 | grep 回 | grep -oE '[0-9]+' | head -1)
latest=$(($latest+1))
gh issue create --title "第${latest}回 雑談会ログ - `date '+%Y/%m/%d'`" --body "今週の雑談会のログです:memo:"
gh issue create --title "第${latest}回 雑談会ログ - `date --date '+4 days' '+%Y/%m/%d'`" --body "今週の雑談会のログです:memo:"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commentが遅くなりましたが date --date 'next friday' +%Y/%m/%d にした方が、実行日時に依存しにくくなるかなと思いました。(TZは考慮してないですが)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next fridayできるんですね。後で修正Pull request作ります!

Copy link
Member

@masutaka masutaka Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next friday

$ brew install coreutils していれば、gdate コマンドが使え、$ man gdate でいろいろ確認できますね。:smile:

Copy link
Member

@masutaka masutaka Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`date --date '+4 days' '+%Y/%m/%d'`

あと、今回はそんなに関係ないですが、$(date --date '+4 days' '+%Y/%m/%d') にしたほうが、入れ子に出来る、可読性が上がるなどメリットがありそうです。常に $(...) を使うで良いと思います。

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}