{"componentChunkName":"component---src-templates-post-js","path":"/blog/projects/dangerjs-plugin-todos/","result":{"data":{"header":{"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAMCBf/EABUBAQEAAAAAAAAAAAAAAAAAAAEC/9oADAMBAAIQAxAAAAHjiagKm0wchP/EABwQAAMAAQUAAAAAAAAAAAAAAAECAwAQEhMxQf/aAAgBAQABBQKKclKrtbJsFNCug68z/8QAFREBAQAAAAAAAAAAAAAAAAAAIEH/2gAIAQMBAT8Bg//EABURAQEAAAAAAAAAAAAAAAAAACBB/9oACAECAQE/AaP/xAAcEAACAgIDAAAAAAAAAAAAAAABEQACECEgMWH/2gAIAQEABj8CFeomCPMbq5qq4//EABsQAQABBQEAAAAAAAAAAAAAAAEAEBEhMUFR/9oACAEBAAE/IcuA6sv44DQgdOMbXvc0Gk9U/9oADAMBAAIAAwAAABDb537/xAAVEQEBAAAAAAAAAAAAAAAAAAABEP/aAAgBAwEBPxACCf/EABYRAAMAAAAAAAAAAAAAAAAAAAERIP/aAAgBAgEBPxBmH//EAB0QAQABBAMBAAAAAAAAAAAAAAERABAxQSFRYaH/2gAIAQEAAT8QndiXQAmg3lAIlj6FYCpD3QEJaJ+OLB4RUEYcpm3/2Q==","aspectRatio":1,"src":"/static/5a125f11859148d0d0aadc1049ac37f7/82bc5/photo_2020-01-05_20-24-37.jpg","srcSet":"/static/5a125f11859148d0d0aadc1049ac37f7/b736e/photo_2020-01-05_20-24-37.jpg 25w,\n/static/5a125f11859148d0d0aadc1049ac37f7/b2767/photo_2020-01-05_20-24-37.jpg 50w,\n/static/5a125f11859148d0d0aadc1049ac37f7/82bc5/photo_2020-01-05_20-24-37.jpg 100w,\n/static/5a125f11859148d0d0aadc1049ac37f7/decd9/photo_2020-01-05_20-24-37.jpg 150w,\n/static/5a125f11859148d0d0aadc1049ac37f7/3dcee/photo_2020-01-05_20-24-37.jpg 200w,\n/static/5a125f11859148d0d0aadc1049ac37f7/883ec/photo_2020-01-05_20-24-37.jpg 640w","srcWebp":"/static/5a125f11859148d0d0aadc1049ac37f7/4226e/photo_2020-01-05_20-24-37.webp","srcSetWebp":"/static/5a125f11859148d0d0aadc1049ac37f7/12e7b/photo_2020-01-05_20-24-37.webp 25w,\n/static/5a125f11859148d0d0aadc1049ac37f7/ecb58/photo_2020-01-05_20-24-37.webp 50w,\n/static/5a125f11859148d0d0aadc1049ac37f7/4226e/photo_2020-01-05_20-24-37.webp 100w,\n/static/5a125f11859148d0d0aadc1049ac37f7/e8bcc/photo_2020-01-05_20-24-37.webp 150w,\n/static/5a125f11859148d0d0aadc1049ac37f7/1c9b5/photo_2020-01-05_20-24-37.webp 200w,\n/static/5a125f11859148d0d0aadc1049ac37f7/2420f/photo_2020-01-05_20-24-37.webp 640w","sizes":"(max-width: 100px) 100vw, 100px","presentationWidth":100}}},"page":{"fields":{"url":"/blog/projects/dangerjs-plugin-todos/"},"frontmatter":{"title":"DangerJS Plugin - TODOs","subtitle":"Awesome plugin to go with the awesome <a href=\"https://danger.systems/js\">danger-js</a>","keywords":[],"template":"post","canonical_url":"","noindex":null,"date":"2020-03-16T18:30:00.000Z","tweet":"https://twitter.com/rohit_gohri/status/1255790205585547264","github":"rohit-gohri/danger-plugin-todos","content_img_path":{"childImageSharp":{"fluid":{"tracedSVG":"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='450'%20height='300'%20viewBox='0%200%20450%20300'%20preserveAspectRatio='none'%3e%3cpath%20d='M42%204C20%2030%205%2071%201%20109v82c4%2039%2019%2078%2041%20105l3%204h61l-4-3c-30-23-52-63-58-102v-90c6-39%2027-78%2057-102l4-3H45l-3%204m307-1c20%2017%2040%2045%2049%2071%208%2021%208%2026%209%2070%200%2045%200%2051-5%2070-8%2031-29%2064-54%2083l-3%203h60l3-4c22-27%2037-67%2041-105v-82c-4-38-19-79-41-105l-3-4h-60l4%203M157%2030c-14%206-20%2025-13%2039l13%2016c4%204%208%204%2012%200%206-6%202-18-6-18-6%200-9-9-6-18%205-10%2016-9%2019%202%201%203%201%204%204%204s4%201%204%206c1%208%204%2012%2015%2024%204%204%208%204%2012%200%206-6%202-18-6-18s-10-18-2-24c5-3%2013%201%2015%207%201%205%201%205%204%205s3%200%205%208c0%206%202%2010%207%2015l7%207c4%205%2011%204%2013-2%204-7%200-16-7-16-8%200-10-18-2-24%206-4%2015%202%2015%209%200%203%200%203%203%203%204%200%204%200%204%204%201%209%205%2014%2016%2026%204%204%208%204%2012%200%206-6%202-18-6-18s-9-15-3-22c6-6%2014-3%2016%206%201%203%202%204%206%206%205%203%2011%208%2014%2014l3%204v184l-3%205c-3%206-8%209-14%2013l-5%202h5c12%200%2023-6%2028-16l3-5v-91c0-102%200-95-8-103-3-4-10-8-12-8l-2-4c-2-13-13-24-25-24-7%200-15%204-19%2010l-2%203-3-4c-9-12-28-12-36%200l-2%204-5-6c-8-7-17-9-26-5-4%202-11%208-11%2010l-4-3c-7-8-18-11-27-7m-5%2097c-3%203-3%207%200%2010l3%202h72c81%200%2076%200%2076-7s5-7-76-7h-73l-2%202m0%2035c-3%203-3%206%200%209l2%203h145c3-1%205-5%205-8-2-6%202-6-77-6h-73l-2%202m0%2035c-3%203-3%207%200%2010l3%202h144l3-2c3-4%202-9-1-11a1921%201921%200%2000-149%201m0%2035c-3%203-3%207%201%2010a563%20563%200%200091%201c4-2%205-8%201-11-1-2-7-2-46-2-44%200-45%200-47%202'%20fill='%23d3d3d3'%20fill-rule='evenodd'/%3e%3c/svg%3e","aspectRatio":1,"src":"/static/0fd383caaf7adec44b8848f590c3684d/2ffe0/todos.png","srcSet":"/static/0fd383caaf7adec44b8848f590c3684d/f973b/todos.png 113w,\n/static/0fd383caaf7adec44b8848f590c3684d/20493/todos.png 225w,\n/static/0fd383caaf7adec44b8848f590c3684d/2ffe0/todos.png 450w,\n/static/0fd383caaf7adec44b8848f590c3684d/434ed/todos.png 500w","srcWebp":"/static/0fd383caaf7adec44b8848f590c3684d/4fe5d/todos.webp","srcSetWebp":"/static/0fd383caaf7adec44b8848f590c3684d/74efb/todos.webp 113w,\n/static/0fd383caaf7adec44b8848f590c3684d/5da3e/todos.webp 225w,\n/static/0fd383caaf7adec44b8848f590c3684d/4fe5d/todos.webp 450w,\n/static/0fd383caaf7adec44b8848f590c3684d/94679/todos.webp 500w","sizes":"(max-width: 450px) 100vw, 450px","presentationWidth":450}}}}}},"pageContext":{"url":"/blog/projects/dangerjs-plugin-todos/","relativePath":"blog/projects/dangerjs-plugin-todos.md","relativeDir":"blog/projects","base":"dangerjs-plugin-todos.md","name":"dangerjs-plugin-todos","html":"<h3>What is It?</h3>\n<p>A plugin for <a href=\"https://danger.systems/js\" title=\"Danger JS Docs\" target=\"_blank\" rel=\"noopener noreferrer\">danger-js</a> that collects all the \"TODO\" comments introduced in a pull request (PR) and posts them as a comment on the PR.</p>\n<p>It's a pretty simple plugin that just scans your diff for matching comments, it supports different language style comments including JS, C, C++, Ruby, Java, Elm, HTML, Bash, etc. (<a href=\"https://github.com/rohit-gohri/danger-plugin-todos/issues\" title=\"danger-plugin-todos&#x27; issues on Github\" target=\"_blank\" rel=\"noopener noreferrer\">open an issue</a> if something is missing). You can also specify custom keywords other than \"TODO\" or \"FIXME\".</p>\n<h3>How to set it up?</h3>\n<ul>\n<li>Set up <a href=\"https://danger.systems/js\" title=\"Danger JS Docs\" target=\"_blank\" rel=\"noopener noreferrer\">danger-js</a> and add it to your continuous integration (CI) pipeline</li>\n<li>Add <a href=\"https://www.npmjs.com/package/danger-plugin-todos\" title=\"danger-plugin-todos on npm\" target=\"_blank\" rel=\"noopener noreferrer\">danger-plugin-todos</a> to the \"dangerfile\" as mentioned in the README</li>\n</ul>\n<p>Next time your CI pipeline runs for any PR this plugin will scan the diff to get all the To-Do comments and post them through danger as a comment on the PR. The comment will update on consecutive runs.</p>\n<h3>Possible Workflows</h3>\n<h5>Scenario A</h5>\n<p>Sometimes when you start work on a feature you see things along the way that need to be fixed and you end up adding a To-Do or Fix-Me comment for them. The feature branch then gets merged and the comments quickly gets forgotten if they were not related to a part of the code base that sees frequent updates.</p>\n<p>To track such To-Dos this plugin can be used, as a list of them will be added as a comment to the PR. This list of To-Dos can then be moved to a new issue before the PR is merged and the issue added to the backlog.</p>\n<h5>Scenario B</h5>\n<p>This plugin can also be used to create an actual auto-updating To-Do List.</p>\n<p>Just add all your tasks for the PR in the code as To-Dos and open a Work In Progress (WIP) PR, this will create a list of To-Dos in the PR comments.</p>\n<p>Now, as you work on them and remove them the comment will be updated and your list will become smaller. Once you are done with them the PR will be ready to merge.</p>\n<h3>More Features Incoming</h3>\n<p>There are some new ideas that are being worked on (<a href=\"https://github.com/rohit-gohri/danger-plugin-todos/issues\" title=\"danger-plugin-todos&#x27; open issues\" target=\"_blank\" rel=\"noopener noreferrer\">check the issues here</a>), like:</p>\n<ul>\n<li><strong>Generate a link to create a new issue with a list of To-Dos automatically</strong>: This would be pretty great for our Scenario A above. Link can be customized to support different issue trackers</li>\n<li><strong>Show completed To-Dos</strong>: PRs that complete and remove old To-Dos should be celebrated. This would add a success message on removing old To-Dos.</li>\n</ul>\n<p>Anyways, I hope this is useful for you. If you have any ideas on how to make this better feel free to message me on <a href=\"https://twitter.com/rohit_gohri\" title=\"Twitter Profile\" target=\"_blank\" rel=\"noopener noreferrer\">Twitter</a> or open an issue on the repo.</p>","headerImg":"photo_2020-01-05_20-24-37.jpg"}},"staticQueryHashes":["1161966454","1673585186","1866307108","219491723","2948329147","3269044456","629512913"]}