DEV Community

Cover image for ๐Ÿ”„ Using code to write code: Exporting issues with a Bookmarklet
Tea Reggi
Tea Reggi

Posted on

1

๐Ÿ”„ Using code to write code: Exporting issues with a Bookmarklet

When I started back in March at MongoDB I wanted an easy way to create a list of what I was working on.

There are two main pages I need to check on a daily basis:

These two lists show me the main "docket" for the day, and the tickets I need to shepherd.

What I found was that I had to often make lists of these things I'm working on. Between GitHub and Jira things can be a little scattered, there's the reviews I'm doing, reviews I need to request from my fellow colleagues, draft pull requests, and tickets that are assigned to me that don't yet have a PR associated.

These lists ideally would both have a reference to GitHub and Jira. I wanted a way to copy all the links and put them in one place.

What I quickly thought of was creating a simple bookmarklet that would select all the tickets from the DOM.

View the source at this gist: reggi/github-link-bookmarklet.js

Because the links are in markdown it isn't super easy to paste into Slack or a Google doc. What I normally do is render the markdown and then copy the outputted list into slack, which is an unfortunate extra step.

I've been using a chrome extension Bookmarkletifier to make incremental changes and maintain the script, it's not great and can create malformed JavaScript, which doesn't matter in the editor because it all gets minified. I haven't found a better workflow for maintain or writing bookmarklets, I'm curious if anyone has any advice out there.

The script has a useful feature where it can parse the Jira ticket from the pull request and adding a specific link to the ticket. There are some hardcoded things in the script that appeal to my use case, but feel free to rewire it to suit your needs. ๐Ÿค™๐Ÿ

There you have it! Problem solved, everything is a little easier to manage. I hope this inspires other developers not to be afraid to spend a little extra time to write a script that will help them in the long run. Happy coding. ๐Ÿ„

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where youโ€™ll build it, break it, debug it, and fix it. Youโ€™ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good olโ€™ AI to find and fix issues fast.

RSVP here โ†’

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more