However, when I checked the github action log, the following error occurred.
Run abhisheknaiidu/todoist-readme@master with: TODOIST_API_KEY: *** USERNAME: jaejin1 PREMIUM: false (node:2894) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'total_completed' of undefined at updateReadme (/home/runner/work/_actions/abhisheknaiidu/todoist-readme/master/dist/index.js:486:57) at main (/home/runner/work/_actions/abhisheknaiidu/todoist-readme/master/dist/index.js:465:11) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async /home/runner/work/_actions/abhisheknaiidu/todoist-readme/master/dist/index.js:587:5 (node:2894) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:2894) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hi, I am a non-preminum user in todoist. So, I set up the workflow yaml file as follows according to the settings you gave me.
However, when I checked the github action log, the following error occurred.
Run abhisheknaiidu/todoist-readme@master with: TODOIST_API_KEY: *** USERNAME: jaejin1 PREMIUM: false (node:2894) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'total_completed' of undefined at updateReadme (/home/runner/work/_actions/abhisheknaiidu/todoist-readme/master/dist/index.js:486:57) at main (/home/runner/work/_actions/abhisheknaiidu/todoist-readme/master/dist/index.js:465:11) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async /home/runner/work/_actions/abhisheknaiidu/todoist-readme/master/dist/index.js:587:5 (node:2894) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:2894) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
When checking the code, it seems that the PREMIUM variable is read as a string type from the yaml file. The line of code is https://github.com/abhisheknaiidu/todoist-readme/blob/master/dist/index.js#L485.
So I tested it by giving the PREMIUM value "", and it succeeded.
Create and share a PR with the issue.