Repository navigation
Extension Bitbucket - #482
Conversation
There was a problem hiding this comment.
Thanks for the effort @Lp-Francois. I left some minor personal comments, you can see what you do with them.
If you want I can also Pull Request them to you, let me know if you would like that, I didn't do it yet to prevent double work.
I also tested it on my machine and working great!
| }, | ||
| { | ||
| "name": "searchOpenPullRequests", | ||
| "title": "Search Open Pull Requests", |
There was a problem hiding this comment.
I would rename "Search Open Pull Requests" and variants to "Search My Open Pull Requests". Because we only return the current users Pull Requests.
If we would later also want to list all open Pull Requests for a workspace then this would be a different use case for me, so other command.
| icon={{ source: icon.pipeline.self, tintColor: Color.PrimaryText }} | ||
| /> | ||
| <OpenInBrowserAction | ||
| title="Open PRs in Browser" |
There was a problem hiding this comment.
Personal I more like full form text instead of abbreviating Pull Request here. "Open Pull Requests in Browser". It would benefit fuzzy search if added to the actions list.
| <ActionPanel> | ||
| <ActionPanel.Section> | ||
| <OpenInBrowserAction | ||
| title="Open PR in Browser" |
There was a problem hiding this comment.
Personal I more like full form text instead of abbreviating Pull Request here. "Open Pull Request in Browser". It would benefit fuzzy search if added to the actions list.
| icon={{ source: repo.avatarUrl, mask: ImageMask.RoundedRectangle }} | ||
| actions={ | ||
| <ActionPanel> | ||
| <ActionPanel.Section title="Browser actions"> |
There was a problem hiding this comment.
Action request: "Open Branches on Browser", url: https://bitbucket.org/persgroep/<repo>/branches/
| export async function getRepositories(): Promise<any> { | ||
| return await bitbucket.repositories.list({ | ||
| ...defaults, | ||
| pagelen: 50, |
There was a problem hiding this comment.
In my use case 50 is already to little. But I notice that the response time of the Bitbucket API also isn't to great. Getting pagelen 50 already takes >500ms and rises exponentially. Like you said in the readme.md we should probably fetch more repositories in the background and cache them for some amount of time as they don't change that often.
There was a problem hiding this comment.
I thought for a first release to set 50 as default and let the user change it as a preference text field, what do you think?
There was a problem hiding this comment.
I'm afraid that users will hurt themself by settings the pagelen to high. Also the API only accepts values until 100.
I was thinking, when the command is executed
- fetch repositories from storage
- every X amount of time update the storage cache by fetching all repositories.
- provide an action to refresh the cache (so fetch all repositories)
Maybe it's a good idea I do a pull request for this as well as I'm in the workspace with +2000 repos.
There was a problem hiding this comment.
Repositories are not changing a lot, so a cache makes sense.
Is it possible to run a process in the background with Raycast? Like a cronjob to fetch all repositories.
And to avoid spamming the bitbucket API we should run the fetch one by one, incrementing with the page number.
For a high number of repos, we can as well optimize the query to only return the fields we need.
Here I did it with the PipelinesGetQuery() fields option.
For better performance, you can ask the server to only return the fields you really need and to omit unwanted data. To request a partial response and to add or remove specific fields from a response, use the fields query parameter.
|
About the "dashboard". This will be a very specific and personal opinionated "project". I think we should leave it out of this extension (and remove the code as well). |
- full text for pull request - add action to open the branches for a repository - made order of repository actions the same as on web navigation sidebar - rename "Open pull request" to "Open my pull requests"
Bitbucket minor changes
Add extension bitbucket
* add-extension-bitbucket: perf: set pageLen to 100 & only query necessary fields for List repositories doc: fix readme last breakline # Conflicts: # extensions/bitbucket/src/queries/index.ts
Bitbucket Repositories cache
|
Hi @Lp-Francois 👋 Is this ready for a review? |
|
Hello @pernielsentikaer 👋 yes it is 👌 Thanks to the help of @JeroenVdb |
|
@Lp-Francois can you catch me in Slack? I'm having troubles testing it out—keep getting 401—maybe you have an idea what's going wrong? |
|
After a long debug period on Slack I think we're ready to get this merged, it seems to work as expected 😄 Very good job @Lp-Francois and @JeroenVdb |
|
Thanks for the review @pernielsentikaer 👍 |
update swr lib
There was a problem hiding this comment.
@Lp-Francois Thank you for the contribution and good communication, and
@pernielsentikaer @JeroenVdb thanks a lot for the review! 🙏
Let's bring it to the Store 🚀
|
Published to the Raycast Store: |
Hello! 👋
Description
Extension for Bitbucket, allowing to access quickly repositories, pipelines & pull-requests.
Link of slack thread.
Type of change
Screencast
Checklist