Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octo pr checkout uses picker when not in Octo buffer #814

Merged
merged 5 commits into from
Jan 29, 2025
Merged

Conversation

wd60622
Copy link
Collaborator

@wd60622 wd60622 commented Jan 22, 2025

Describe what this PR does / why we need it

When not in a Octo buffer, the command will use the PR picker to select a PR to checkout.

checkout.mp4

Does this pull request fix one issue?

Describe how you did it

Very easy following #803

Describe how to verify it

  1. Open a non-Octo buffer
  2. Run :Octo pr checkout

Special notes for reviews

Only works for telescope

Checklist

  • Passing tests and linting standards
  • Documentation updates in README.md and doc/octo.txt

@ldelossa
Copy link
Contributor

ldelossa commented Jan 28, 2025

This is dope @wd60622

A bit of a thought about this. It would be cool if "checkout" means it also loads up the review layout (but does not start a review just yet)

Sometimes, you may want to look at a PR's details (changed files, comments, comment threads in their relation to source code), but have no desire to add a review. You may just want to browse the changes and read comments. Right now, this required you to start a review, right?

If so, it would be nice to make "checkout" command load up what is currently the review layout, and then make "review.start" actually start a review. In other words, the review.start functionality today just becomes a subset of the mode youre put in when you do "checkout"

@wd60622
Copy link
Collaborator Author

wd60622 commented Jan 29, 2025

Thanks. I was thinking itd be helpful

That sounds useful too. One element is that gh pr checkout is a cli command and its good to stick close to that. For instance, that is still being using here but the pr number is found through the picker.

Have you taken a look at Octo pr changes? It has some elements of what you mentioned. There is no picker aspect to it at the moment though

@wd60622
Copy link
Collaborator Author

wd60622 commented Jan 29, 2025

I'll merge this and make some issues based on this comment @ldelossa

@wd60622 wd60622 merged commit 5b71799 into master Jan 29, 2025
5 checks passed
@wd60622 wd60622 deleted the checkout-picker branch January 29, 2025 16:22
@ldelossa
Copy link
Contributor

Sounds good! this is a solid inclusion :)

@wd60622 wd60622 mentioned this pull request Jan 29, 2025
@wd60622 wd60622 added the enhancement New feature or request label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants