Code Monkey home page Code Monkey logo

miyamoto's People

Contributors

amatotsuji avatar dkastl avatar halsk avatar katoken-0215 avatar masaki avatar masuidrive avatar monmon avatar sanak avatar yuzurus avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

miyamoto's Issues

Remove the persons left

Is your feature request related to a problem? Please describe.
Daily notification remains for the members who left Georepublic already. (thibault, iosefa, leo and marc)

Describe the solution you'd like
Change setting? I cannot find the list of username.

Describe alternatives you've considered
none

Additional context
none

google sheet formatted field types

The columns for start and end times and break times can be better formatted. Right now I am manually formatting them to time and duration. This makes it easier to perform calculations, like the number of hours and minutes worked in a day.

Project tracking

The previous timesheet had a column called I worked today on [projects,tasks].
Current bot not support that kind of function.

Support default accumulative break times

Currently, break XX mins overwrite existence break time, but always accumulating past values (in a head) is a bit difficult, and I like declarative break times than accumulated ones, so it may be better to support default accumulative break times.

Here is my idea.

# Initial break
break 10 mins
> @foo I changed break time to 10 mins
# Accumulate break times
break 20 mins
> @foo I changed break time to 30 mins
# Overwrite break times by "set" keyword
break 120 mins set
> @foo I changed break time to 120 mins

Multiple records in one day

Mentioned by iosefa.

hmm… is there a way to start and stop the timer multiple times during a day? It seems that you can only start the timer once and then stop it once for the day. I will often work for a few hours, then take a break, then work for more hours … I sometimes cannot accurately anticipate how long my breaks will be. I.e. a pause feature would be nice

adding pause and resume commands

I find it nice to be able to manually trigger the timer to pause and resume. To this end, we could add pause and resume commands. For example, a command flow could look like:

morning: starts the timer for the day (at the current time)
pause: pauses the timer (the beginning of a break)
resume: resumes the timer (the end of a break)
bye: stops the timer for the day (at the current time.

This can be done with the option to specify breaks as well (or automatically including them --> see #21 ).

Feeling tracking

The previous time tracking sheet had a column named How was your day? to track people's feelings.
It sas a good idea but this bot doesn't support such function.

Create summary sheet

We need to create a summary of each staffs tracked time.
I am thinking to use Google BigQuery.

Upgrade Node.js from v12 to v18

Is your feature request related to a problem? Please describe.
From the following GitHub Actions workflow, Node.js v12 seems to be assumed to be used,
https://github.com/Georepublic/miyamoto/blob/master/.github/workflows/nodejs.yml

but v12 security support was already ended at 2022-04-30.
https://endoflife.date/nodejs

v16 security support will be ended at 2023-09-11, so supporting v18 is preferable to avoid security risk.

Describe the solution you'd like
Upgrade Node.js from v12 to v18 with CI.

Hide daily 11:50 JST Miyamoto-san's notices

Currently, the following Miyamoto-san's notices are posted at 11:50 JST everyday, but it may be good to hide such maintenance notices.

最新のみやもとさんの準備ができました!
https://github.com/masuidrive/miyamoto/blob/master/UPDATE.md を読んでください。
# 私の成長記録
## 20141027.0
- アップデートメッセージが消えない問題が直りました。ごめんなさい。
## 20141022.0
- アップデートチェックが直りました。
- アップデート内容をお伝えします!
## 20141021.0
- 日付がよく分からなくなっていたのですが、ちゃんと勉強しました。
## 20141019.0
- migrateを修正
- 一般公開
## 20141016.1
- テストの為にバージョンアップ
## 20141016.0
− テスト公開

Return spreadsheet url

It's good to get the URL of the spreadsheet in easy way.

By saying spreadsheet, bot should return the URL of the spreadsheet.

Threaded communication

I think it would be nice, if the bot conversation would take place in a single thread., at least the response of the bot could be in a thread to avoid endless posts.

Screenshot from 2020-02-26 09-35-46

Highlight time inconsistencies

There may be time sheet inconsistencies at times. For example:

Work start: 14:00 24/02/2020
Work end: 13:30 24/02/2020

Highlighting these in the Excel sheet may be useful. Or just preventing this in the first place.

Some "timesheets - Timesheets" tests fail in Node.js 12, 16 and 18 environments

Describe the bug
Some "timesheets - Timesheets" tests fail in Node.js 12, 16 and 18 environments.
(The following is Node.js v16 case output.)

% make test
node testrunner.js
(node:11113) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11115) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11114) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11116) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)

Assertions:
┌────────────────┬────────────────────────┬──────────────────────────┬────────┐
│ Module         │ Test                   │ Assertion                │ Result │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│ event_listener │ EventListener          │                          │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │                          │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │                          │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│ date_utils     │ DateUtils.parseTime    │ 13:01                    │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 2:02pm                   │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 午後4:3                    │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 5pm                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 5:1pm                    │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 18時                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 19 : 20                  │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 午後8                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ お昼                       │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │ DateUtils.parseMinutes │ 90分                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 90 minutes               │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 90 mins                  │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 1 minute                 │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 90 mins                  │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 1.5時間                    │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 1時間                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 1 hour                   │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 60分                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 2 hours                  │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 2時間15分                   │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │ DateUtils.parseDate    │ 12/1                     │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 1/1                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 2月3日                     │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 2020/1/1                 │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 1976年2月8日                │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 昨日                       │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 今日                       │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 明日                       │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 1/1                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 昨日                       │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 今日                       │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 明日                       │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 3日後                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │ DateUtils.parseWday    │ 水曜日                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ Wed                      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ あ                        │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ 月日                       │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│ timesheets     │ Timesheets             │ test1:おはよう               │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:おはよう 4:56          │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:おはよう 4:56 2/3      │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:おはよう               │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:おはよう 4:56          │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:おつ                 │ fail   │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:お疲れさま 14:56        │ fail   │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:お疲れさま 16:23 12/3   │ fail   │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:おつ                 │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:お疲れさま 14:56        │ fail   │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:おつ                 │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:お疲れさま 14:56        │ fail   │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:休憩 30分             │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:休憩 30分             │ fail   │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:お休み                │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:今日はお休み             │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:明日はお休み             │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:12/3はお休みでした        │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:お休みしません            │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:今日はお休みしません         │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:明日はお休みしません         │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がいる?              │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がいる?              │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がいる?              │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がいる?              │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がいる?              │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がお休み?             │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がお休み?             │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がお休み?             │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がお休み?             │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:誰がお休み?             │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:__confirmSignIn__  │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:__confirmSignIn__  │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:__confirmSignIn__  │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:__confirmSignOut__ │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:__confirmSignOut__ │ ok     │
├────────────────┼────────────────────────┼──────────────────────────┼────────┤
│                │                        │ test1:__confirmSignOut__ │ ok     │
└────────────────┴────────────────────────┴──────────────────────────┴────────┘

Summary:
┌────────────────────────────────────────────────────┬────────┬────────┬───────┬─────────┐
│ File                                               │ Failed │ Passed │ Total │ Runtime │
├────────────────────────────────────────────────────┼────────┼────────┼───────┼─────────┤
│ ...republic/git/miyamoto/scripts/event_listener.js │ 0      │ 3      │ 3     │ 87      │
├────────────────────────────────────────────────────┼────────┼────────┼───────┼─────────┤
│ .../georepublic/git/miyamoto/scripts/timesheets.js │ 6      │ 31     │ 37    │ 91      │
├────────────────────────────────────────────────────┼────────┼────────┼───────┼─────────┤
│ .../georepublic/git/miyamoto/scripts/date_utils.js │ 0      │ 37     │ 37    │ 90      │
└────────────────────────────────────────────────────┴────────┴────────┴───────┴─────────┘


Errors:

Module: timesheets Test: Timesheets
test1:おつ
    at msgTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:78:12)
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:84:7
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:125:5
    at storageTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:82:5)
    at Object.<anonymous> (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:124:3)

Module: timesheets Test: Timesheets
test1:お疲れさま 14:56
    at msgTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:78:12)
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:84:7
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:126:5
    at storageTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:82:5)
    at Object.<anonymous> (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:124:3)

Module: timesheets Test: Timesheets
test1:お疲れさま 16:23 12/3
    at msgTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:78:12)
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:84:7
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:127:5
    at storageTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:82:5)
    at Object.<anonymous> (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:124:3)

Module: timesheets Test: Timesheets
test1:お疲れさま 14:56
    at msgTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:78:12)
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:84:7
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:135:5
    at storageTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:82:5)
    at Object.<anonymous> (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:133:3)

Module: timesheets Test: Timesheets
test1:お疲れさま 14:56
    at msgTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:78:12)
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:84:7
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:143:5
    at storageTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:82:5)
    at Object.<anonymous> (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:141:3)

Module: timesheets Test: Timesheets
test1:休憩 30分
    at msgTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:78:12)
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:84:7
    at /Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:157:5
    at storageTest (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:82:5)
    at Object.<anonymous> (/Users/sanak/Projects/georepublic/git/miyamoto/tests/timesheets_test.js:156:3)
{
  files: 3,
  assertions: 77,
  failed: 6,
  passed: 71,
  runtime: 268,
  tests: 6,
  coverage: {
    files: 0,
    statements: { covered: 0, total: 0 },
    branches: { covered: 0, total: 0 },
    functions: { covered: 0, total: 0 },
    lines: { covered: 0, total: 0 }
  }
}

To Reproduce
Run make test after executing npm install.

Expected behavior
All tests should pass.

Support break time at specific day

Is your feature request related to a problem? Please describe.
Currently, break xx (mins|hours) doesn't detect specific day, although hi and bye support it.

Describe the solution you'd like
Support break time at specific day. (ex: bye 30 mins 2/27)

This is related with #10 (Time zone support), but sometimes, specifying break at specific day is necessary, so I am thinking to support this before #10.

Slack's Event Subscriptions is not working

Describe the bug
doPost can not handle the Slack's Event Subscriptions because of invalid api request to get user information.

To Reproduce
Setup Event Subscriptions on Slack and say something to bot.

Expected behavior
Handle the Event Subscriptions event correctly.

Break time

This bot is very simple. Just tracking start/end time of working.
So there is no concept of break time now.
We need to discuss how we can track the break time.

  1. We use it as it is. For example, we can reduce one hour from the total time if the working time exceed four hours.
  2. Automatically add some rules
  3. Add command like break 1 hour and set the value on the sheet.

Any thoughts?

Track paid holidays

  • Each employee has a yearly paid holidays
  • People can set the paid holidays by Slack (or add the records on the spreadsheet manually.)
  • The report adds 8 hours of work on that day.
  • The report shows how many paid holidays the staff can use.
  • The report shows when the staff used the paid holidays

Dataset setting error in BigQuery dashboard

Describe the bug
When accessing to the dashboard URL, I saw the following error in each chart block.

データセットの設定エラー
Looker Studioではデータセットに接続できません。
詳細を表示

To Reproduce
Access to the dashboard URL from browser.

Expected behavior
The charts should be displayed.

Screenshots
looker-studio-dataset-connect-error

Time zone support

There are no adjustments of time differences. I'm not sure how it affects so far.

If an `out time` exceed 24:00, the working time becomes minus.

Currently, the calculation ignores date value from the end_time because if people enter the time manually, the datetime becomes 1899/12/30 11:00:00 .
For enabling the over-night work, change the calculation method to see date value if the end_time contains corrct date.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.