bitcrowd / tickety-tick

A browser extension that helps you name branches and write better commit messages
MIT License
57 stars 10 forks source link

Add tara ai support #274

Closed schanso closed 3 years ago

schanso commented 3 years ago

Hi everyone πŸ‘‹

Hope you're doing well! I recently started fiddling around with tara.ai for a side project and quickly realized manually keeping branch names and CLI commands in sync with what I've grown to love with tickety-tick was too painful. So I added a Tara adapter here.

I tried to follow practices used in other adapters closely and added documentation where I thought it was necessary.


How it works πŸ‘·β€β™€οΈ

Tara uses workspaces with multiple requirements, or projects, each. Task IDs are 1-based indices unique within each workspace (not within the requirement). Page URLs follow the pattern: https://app.tara.ai/<workspace-name>/tasks/<id>.

The adapter extracts ticket information from the DOM. Given the obfuscated CSS classes, most context is retrieved from data-cy attributes. This is obviously not ideal, given they might vanish from production code at some point. πŸ˜’ However, any other CSS changes would probably require the same need for maintenance?

Tara has two ways to present tickets, 1) in a modal-like overlay

tara_modal

2) in full-page view

tara_full-page

This is important, because they use draft-js for rich text editing, and 1. has an extra editor node that needs to be skipped in order to extract the ticket description.

Example branch

feature/task-8-add-some-feature

Example message

[#TASK-8] Add some feature

We are currently missing some feature in our app. Let's "change" this.
See `attached` screenshot for more information .

https://app.tara.ai/private-projects/tasks/8

Example CLI command

git checkout -b 'feature/task-8-add-some-feature' && git commit --allow-empty -m '[#TASK-8] Add some feature

We are currently missing some feature in our app. Let'\''s "change" this.
See `attached` screenshot for more information .

https://app.tara.ai/private-projects/tasks/8
'

Tara does not give the option to distinguish between story, bug, task etc., so the ticket type is hard-coded as "feature" for now.


Demo πŸ’Ώ

You can see the adapter in action here πŸ‘‡

tara_demo


Please let me know if you don't see the need for a Tara adapter right now or in this form. Your πŸ‘€ would be highly appreciated, of course.

I'll show myself out πŸ’ƒ

nickgnd commented 3 years ago

I passed by to say hello to @schanso, nice to see you here (and great work, thanks :bow:)

schanso commented 3 years ago

Thanks for coming back to this so quickly! 😊 I'm doing well, but glancing at your avatars and reading your comments throws me back to when life was a little easier on all of us.

communication with their API could also be a useful source for Tickety Tick

That was my initial hope, too, and there is a lot going on in the network tab, but mostly analytics. I couldn't deduce anything useful, unfortunately.

With a few small adjustments

I will get to them, hopefully tonight. Thanks for the reviews, @klappradla and @pmeinhardt πŸ’ͺ

I passed by to say hello to @schanso

Thanks for stopping by and the kind words! ❀️

schanso commented 3 years ago

I worked in your feedback, @klappradla and @pmeinhardt, please have another look whenever you find the time πŸ™‡