shortcut-client-js icon indicating copy to clipboard operation
shortcut-client-js copied to clipboard

Search by Pull Request

Open antdking opened this issue 4 years ago • 4 comments
trafficstars

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.

antdking avatar Jul 01 '21 11:07 antdking

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.

charpeni avatar Oct 01 '21 18:10 charpeni

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

iSWORD avatar Feb 04 '22 14:02 iSWORD

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:

  • has:branch
  • has:commit
  • has:pr
  • branch:<branch name>
  • commit:<commit sha or url>

I hope that helps!

tobias avatar Feb 04 '22 18:02 tobias

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

tobias avatar Feb 04 '22 18:02 tobias