shortcut-client-js
shortcut-client-js copied to clipboard
Search by Pull Request
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.
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.
We have a different workaround and it's unstable. Would be great if we could query tickets by PR link.
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:branchhas:commithas:prbranch:<branch name>commit:<commit sha or url>
I hope that helps!
These operators have now been documented at https://help.shortcut.com/hc/en-us/articles/360000046646