useshortcut / shortcut-client-js

The official JavaScript client library for the Shortcut (formerly Clubhouse) REST API.
https://useshortcut.github.io/shortcut-client-js/
132 stars 31 forks source link

Search by Pull Request #107

Open antdking opened 3 years ago

antdking commented 3 years ago

First off, thanks for the great product. We've been a use of your Product for a few years.

Very similar to #70, We'd like to be able to query for tickets based on their associated Pull Requests.

While there are workarounds (we're currently parsing the PR Description for clubhouse links), it'd be great if this were a native feature of Clubhouse's.

Our usecase is we're doing a site deploy for every incoming PR, and need to post the URL to the ticket (as an external link) so our QA team can verify features.

charpeni commented 2 years ago

Thanks for reaching @antdking, glad to hear that!

I can't agree more. We also have the same use case, we're currently using something in-house to achieve something similar to that but not quite yet.

I can't make any promises right now, but this is definitely in our pipeline.

iSWORD commented 2 years ago

We have a different workaround and it's unstable. Would be great if we could query tickets by PR link.

tobias commented 2 years ago

This isn't yet documented, but you can now search for stories with a certain PR using the https://shortcut.com/api/rest/v3#Search endpoint as long as the story was created or has been updated since ~2021-10-10 (in order for this information to be indexed).

You can search by url or PR number with pr:https://github.com/useshortcut/shortcut-client-js/pull/133 or pr:133, respectively.

You can also now search by:

I hope that helps!

tobias commented 2 years ago

These operators have now been documented at https://help.shortcut.com/hc/en-us/articles/360000046646