From 3fe0b7afded0f4d5333bd9924682c462139358d9 Mon Sep 17 00:00:00 2001 From: Siddharth Date: Mon, 22 Mar 2021 11:11:20 +0530 Subject: [PATCH] made some fixes and added new methods and documented them --- README.md | 3 +- action.yml | 5 - dist/index.js | 259 +++++++++++++++++++++++++++++++++++++++----------- index.js | 52 +++++++++- package.json | 6 +- 5 files changed, 258 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 2666ec3..4c92747 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,8 @@ The tags will automagically get filled with the specified stats. **_This give * ``: The day on which your longest Todoist daily streak has ended * ``: The length of your longest weekly streak * ``: The day on which your longest Todoist weekly streak has started -* ``: The day on which your longest Todoist daily streak has ended (most of the time this will be this week or last week) +* ``: The day on which your longest Todoist daily streak has ended +* ``: A list showing your Todoist Karma activity * _More coming soon..._ diff --git a/action.yml b/action.yml index 8115446..5ffe1a5 100644 --- a/action.yml +++ b/action.yml @@ -11,11 +11,6 @@ inputs: description: 'Your GitHub username' default: ${{ github.repository_owner }} required: false - - PREMIUM: - description: 'Premium User or Not' - default: false - required: false runs: using: "node12" diff --git a/dist/index.js b/dist/index.js index f47f96c..32ac53b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -608,6 +608,32 @@ function plural(ms, msAbs, n, name) { } +/***/ }), + +/***/ 82: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +//# sourceMappingURL=utils.js.map + /***/ }), /***/ 87: @@ -617,6 +643,42 @@ module.exports = require("os"); /***/ }), +/***/ 102: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +// For internal use, subject to change. +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(__webpack_require__(747)); +const os = __importStar(__webpack_require__(87)); +const utils_1 = __webpack_require__(82); +function issueCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueCommand = issueCommand; +//# sourceMappingURL=file-command.js.map + +/***/ }), + /***/ 104: /***/ (function(__unusedmodule, __unusedexports, __webpack_require__) { @@ -624,10 +686,11 @@ const core = __webpack_require__(470); const axios = __webpack_require__(53); const Humanize = __webpack_require__(481); const dayjs = __webpack_require__(629); +const relativeTime = __webpack_require__(916); +dayjs.extend(relativeTime); const fs = __webpack_require__(747); const exec = __webpack_require__(898); const TODOIST_API_KEY = core.getInput("TODOIST_API_KEY"); -const PREMIUM = core.getInput("PREMIUM"); async function main() { const stats = await axios(`https://api.todoist.com/sync/v8.3/completed/get_stats?token=${TODOIST_API_KEY}`); @@ -644,9 +707,7 @@ async function updateReadme(data) { if (newReadme !== readmeData) { core.info("Writing to " + README_FILE_PATH); fs.writeFileSync(README_FILE_PATH, newReadme); - if (!process.env.TEST_MODE) { - commitReadme(); - } + if (!process.env.TEST_MODE) commitReadme(); } else { core.info("No change detected, skipping"); process.exit(0); @@ -694,6 +755,49 @@ const buildReadme = (prevReadmeContent, data) => { let ka = parsedData.karma_update_reasons; + parsedData.activity = []; + + ka.forEach(reason => { + const kaData = {}; + + kaData.plus = reason.positive_karma; + kaData.minus = reason.negative_karma; + kaData.current = reason.new_karma; + kaData.plusReasons = []; + kaData.minusReasons = []; + kaData.time = dayjs().to(dayjs(reason.time)); + + const updateReasons = { + 1: "Addition of tasks.", + 2: "Completion of tasks.", + 3: "Usage of advanced features.", + 4: "Usage of Todoist.", + 5: "Signed up for Todoist Beta", + 6: "Usage of Todoist support section", + 7: "Signed up for Todoist Premium", + 8: "Completion of Getting Started Guide task", + 9: "Daily Goal reached.", + 10: "Weekly Goal reached!", + 50: "Tasks overdue for too long", + 52: "Inactive for a long period of time" + }; + + reason.positive_karma_reasons.forEach(plusReason => kaData.plusReasons.push(updateReasons[plusReason])); + reason.negative_karma_reasons.forEach(minusReason => kaData.minusReasons.push(updateReasons[minusReason])); + + parsedData.activity.push(kaData); + }); + + parsedData.parsedActivity = []; + parsedData.activity.forEach(act => { + let template = + [`* ${act.time} +${act.plus} -${act.minus}`, + ` * Activity:`]; + act.plusReasons.forEach(plusReason => template.push(` * + ${plusReason}`)); + act.minusReasons.forEach(minusReason => template.push(` * - ${minusReason}`)); + parsedData.parsedActivity.push(template.join("\n")); + }); + let newContent = prevReadmeContent .replace(/.*<\/td-kl>/g, `${parsedData.karma_level}`) .replace(/.*<\/td-k>/g, `${Humanize.formatNumber(parsedData.karma)}`) @@ -710,7 +814,7 @@ const buildReadme = (prevReadmeContent, data) => { .replace(/.*<\/td-mdst>/g, `${parsedData.goals.max_daily_streak.end}`) .replace(/.*<\/td-mwsc>/g, `${Humanize.formatNumber(parsedData.goals.max_weekly_streak.count)}`) .replace(/.*<\/td-mwsf>/g, `${parsedData.goals.max_weekly_streak.start}`) - .replace(/.*<\/td-mwst>/g, `${parsedData.goals.max_weekly_streak.end}`); + .replace(/.*<\/td-ka>/g, `${parsedData.parsedActivity.join("\n")}`); return newContent; }; @@ -1056,19 +1160,12 @@ module.exports = function xhrAdapter(config) { delete requestHeaders['Content-Type']; // Let the browser set it } - if ( - (utils.isBlob(requestData) || utils.isFile(requestData)) && - requestData.type - ) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - var request = new XMLHttpRequest(); // HTTP basic authentication if (config.auth) { var username = config.auth.username || ''; - var password = unescape(encodeURIComponent(config.auth.password)) || ''; + var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); } @@ -1339,6 +1436,9 @@ axios.all = function all(promises) { }; axios.spread = __webpack_require__(879); +// Expose isAxiosError +axios.isAxiosError = __webpack_require__(769); + module.exports = axios; // Allow use of default import syntax in TypeScript @@ -1357,7 +1457,7 @@ module.exports = require("assert"); /***/ 361: /***/ (function(module) { -module.exports = {"name":"axios","version":"0.20.0","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test && bundlesize","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://github.com/axios/axios","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.10.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}; +module.exports = {"name":"axios","version":"0.21.1","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test && bundlesize","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://github.com/axios/axios","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.10.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}; /***/ }), @@ -1452,6 +1552,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const os = __importStar(__webpack_require__(87)); +const utils_1 = __webpack_require__(82); /** * Commands * @@ -1505,28 +1606,14 @@ class Command { return cmdStr; } } -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -exports.toCommandValue = toCommandValue; function escapeData(s) { - return toCommandValue(s) + return utils_1.toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A'); } function escapeProperty(s) { - return toCommandValue(s) + return utils_1.toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') @@ -1576,6 +1663,8 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const command_1 = __webpack_require__(431); +const file_command_1 = __webpack_require__(102); +const utils_1 = __webpack_require__(82); const os = __importStar(__webpack_require__(87)); const path = __importStar(__webpack_require__(622)); /** @@ -1602,9 +1691,17 @@ var ExitCode; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function exportVariable(name, val) { - const convertedVal = command_1.toCommandValue(val); + const convertedVal = utils_1.toCommandValue(val); process.env[name] = convertedVal; - command_1.issueCommand('set-env', { name }, convertedVal); + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + const delimiter = '_GitHubActionsFileCommandDelimeter_'; + const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; + file_command_1.issueCommand('ENV', commandValue); + } + else { + command_1.issueCommand('set-env', { name }, convertedVal); + } } exports.exportVariable = exportVariable; /** @@ -1620,7 +1717,13 @@ exports.setSecret = setSecret; * @param inputPath */ function addPath(inputPath) { - command_1.issueCommand('add-path', {}, inputPath); + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; } exports.addPath = addPath; @@ -2850,7 +2953,7 @@ function wrap(protocols) { var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); // Executes a request, following redirects - wrappedProtocol.request = function (input, options, callback) { + function request(input, options, callback) { // Parse parameters if (typeof input === "string") { var urlStr = input; @@ -2885,14 +2988,20 @@ function wrap(protocols) { assert.equal(options.protocol, protocol, "protocol mismatch"); debug("options", options); return new RedirectableRequest(options, callback); - }; + } // Executes a GET request, following redirects - wrappedProtocol.get = function (input, options, callback) { - var request = wrappedProtocol.request(input, options, callback); - request.end(); - return request; - }; + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } + + // Expose the properties on the wrapped protocol + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true }, + }); }); return exports; } @@ -3705,6 +3814,31 @@ var enhanceError = __webpack_require__(369); var isHttps = /https:?/; +/** + * + * @param {http.ClientRequestArgs} options + * @param {AxiosProxyConfig} proxy + * @param {string} location + */ +function setProxy(options, proxy, location) { + options.hostname = proxy.host; + options.host = proxy.host; + options.port = proxy.port; + options.path = location; + + // Basic proxy authorization + if (proxy.auth) { + var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); + options.headers['Proxy-Authorization'] = 'Basic ' + base64; + } + + // If a proxy is used, any redirects must also pass through the proxy + options.beforeRedirect = function beforeRedirect(redirection) { + redirection.headers.host = redirection.host; + setProxy(redirection, proxy, redirection.href); + }; +} + /*eslint consistent-return:0*/ module.exports = function httpAdapter(config) { return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { @@ -3815,11 +3949,11 @@ module.exports = function httpAdapter(config) { }); } - if (shouldProxy) { proxy = { host: parsedProxyUrl.hostname, - port: parsedProxyUrl.port + port: parsedProxyUrl.port, + protocol: parsedProxyUrl.protocol }; if (parsedProxyUrl.auth) { @@ -3834,17 +3968,8 @@ module.exports = function httpAdapter(config) { } if (proxy) { - options.hostname = proxy.host; - options.host = proxy.host; options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); - options.port = proxy.port; - options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path; - - // Basic proxy authorization - if (proxy.auth) { - var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); - options.headers['Proxy-Authorization'] = 'Basic ' + base64; - } + setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); } var transport; @@ -4368,6 +4493,25 @@ formatters.O = function (v) { module.exports = require("zlib"); +/***/ }), + +/***/ 769: +/***/ (function(module) { + +"use strict"; + + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +module.exports = function isAxiosError(payload) { + return (typeof payload === 'object') && (payload.isAxiosError === true); +}; + + /***/ }), /***/ 779: @@ -4451,7 +4595,8 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData Axios.prototype[method] = function(url, config) { return this.request(mergeConfig(config || {}, { method: method, - url: url + url: url, + data: (config || {}).data })); }; }); @@ -4753,6 +4898,14 @@ const exec = (cmd, args = [], options = {}) => new Promise((resolve, reject) => module.exports = exec; +/***/ }), + +/***/ 916: +/***/ (function(module) { + +!function(r,t){ true?module.exports=t():undefined}(this,function(){"use strict";return function(r,t,e){r=r||{};var n=t.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};e.en.relativeTime=o;var d=function(t,n,d,i){for(var u,a,f,s=d.$locale().relativeTime||o,l=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=l.length,m=0;m0,y<=c.r||!c.r){y<=1&&m>0&&(c=l[m-1]);var p=s[c.l];a="string"==typeof p?p.replace("%d",y):p(y,n,c.l,f);break}}if(n)return a;var v=f?s.future:s.past;return"function"==typeof v?v(a):v.replace("%s",a)};n.to=function(r,t){return d(r,t,this,!0)},n.from=function(r,t){return d(r,t,this)};var i=function(r){return r.$u?e.utc():e()};n.toNow=function(r){return this.to(i(this),r)},n.fromNow=function(r){return this.from(i(this),r)}}}); + + /***/ }), /***/ 946: diff --git a/index.js b/index.js index 91f5c48..4a7a4ae 100644 --- a/index.js +++ b/index.js @@ -2,10 +2,11 @@ const core = require("@actions/core"); const axios = require("axios"); const Humanize = require("humanize-plus"); const dayjs = require("dayjs"); +const relativeTime = require('dayjs/plugin/relativeTime'); +dayjs.extend(relativeTime); const fs = require("fs"); const exec = require("./exec"); const TODOIST_API_KEY = core.getInput("TODOIST_API_KEY"); -const PREMIUM = core.getInput("PREMIUM"); async function main() { const stats = await axios(`https://api.todoist.com/sync/v8.3/completed/get_stats?token=${TODOIST_API_KEY}`); @@ -22,9 +23,7 @@ async function updateReadme(data) { if (newReadme !== readmeData) { core.info("Writing to " + README_FILE_PATH); fs.writeFileSync(README_FILE_PATH, newReadme); - if (!process.env.TEST_MODE) { - commitReadme(); - } + if (!process.env.TEST_MODE) commitReadme(); } else { core.info("No change detected, skipping"); process.exit(0); @@ -72,6 +71,49 @@ const buildReadme = (prevReadmeContent, data) => { let ka = parsedData.karma_update_reasons; + parsedData.activity = []; + + ka.forEach(reason => { + const kaData = {}; + + kaData.plus = reason.positive_karma; + kaData.minus = reason.negative_karma; + kaData.current = reason.new_karma; + kaData.plusReasons = []; + kaData.minusReasons = []; + kaData.time = dayjs().to(dayjs(reason.time)); + + const updateReasons = { + 1: "Addition of tasks.", + 2: "Completion of tasks.", + 3: "Usage of advanced features.", + 4: "Usage of Todoist.", + 5: "Signed up for Todoist Beta", + 6: "Usage of Todoist support section", + 7: "Signed up for Todoist Premium", + 8: "Completion of Getting Started Guide task", + 9: "Daily Goal reached.", + 10: "Weekly Goal reached!", + 50: "Tasks overdue for too long", + 52: "Inactive for a long period of time" + }; + + reason.positive_karma_reasons.forEach(plusReason => kaData.plusReasons.push(updateReasons[plusReason])); + reason.negative_karma_reasons.forEach(minusReason => kaData.minusReasons.push(updateReasons[minusReason])); + + parsedData.activity.push(kaData); + }); + + parsedData.parsedActivity = []; + parsedData.activity.forEach(act => { + let template = + [`* ${act.time} +${act.plus} -${act.minus}`, + ` * Activity:`]; + act.plusReasons.forEach(plusReason => template.push(` * + ${plusReason}`)); + act.minusReasons.forEach(minusReason => template.push(` * - ${minusReason}`)); + parsedData.parsedActivity.push(template.join("\n")); + }); + let newContent = prevReadmeContent .replace(/.*<\/td-kl>/g, `${parsedData.karma_level}`) .replace(/.*<\/td-k>/g, `${Humanize.formatNumber(parsedData.karma)}`) @@ -88,7 +130,7 @@ const buildReadme = (prevReadmeContent, data) => { .replace(/.*<\/td-mdst>/g, `${parsedData.goals.max_daily_streak.end}`) .replace(/.*<\/td-mwsc>/g, `${Humanize.formatNumber(parsedData.goals.max_weekly_streak.count)}`) .replace(/.*<\/td-mwsf>/g, `${parsedData.goals.max_weekly_streak.start}`) - .replace(/.*<\/td-mwst>/g, `${parsedData.goals.max_weekly_streak.end}`); + .replace(/.*<\/td-ka>/g, `${parsedData.parsedActivity.join("\n")}`); return newContent; }; diff --git a/package.json b/package.json index 6e8362c..3451fe3 100644 --- a/package.json +++ b/package.json @@ -22,12 +22,12 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/abhisheknaiidu/todoist-readme.git" + "url": "git+https://github.com/SiddharthShyniben/todoist-readme.git" }, "author": "Abhishek Naidu", "license": "ISC", "bugs": { - "url": "https://github.com/abhisheknaiidu/todoist-readme/issues" + "url": "https://github.com/SiddharthShyniben/todoist-readme/issues" }, - "homepage": "https://github.com/abhisheknaiidu/todoist-readme#readme" + "homepage": "https://github.com/SiddharthShyniben/todoist-readme#readme" }