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

PR checkout commands #17334

Open
delvh opened this issue Oct 16, 2021 · 2 comments
Open

PR checkout commands #17334

delvh opened this issue Oct 16, 2021 · 2 comments
Labels
topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality

Comments

@delvh
Copy link
Member

delvh commented Oct 16, 2021

Feature Description

GitHub offers a dropdown to the right of a PR title to copy the checkout instructions for said instructions.
Gitea could offer the same with the only difference being instead of the GitHub CLI,
a) Agit-Flow with the command (I hope I understand the agit-flow commands correctly)

git download $PR_ID

b) Pure Git with the command

# Assumes you named the remote host origin
git fetch origin pull/$PR_ID/head:$BRANCH_NAME_AS_NAMED_BY_PR_CREATOR && git switch $BRANCH_NAME_AS_NAMED_BY_PR_CREATOR

Alternatively, to be on the save side regarding potential name conflicts:

# Assumes you named the remote host origin
git fetch origin pull/$PR_ID/head:pr-$BRANCH_NAME_AS_NAMED_BY_PR_CREATOR && git switch pr-$BRANCH_NAME_AS_NAMED_BY_PR_CREATOR

are provided.

Screenshots

Display on GitHub:
image

@delvh delvh changed the title Add PR checkout commands PR checkout commands Oct 16, 2021
@noerw
Copy link
Member

noerw commented Oct 17, 2021

tea pr checkout <idx> is also an option

@noerw noerw added type/enhancement An improvement of existing functionality topic/ui Change the appearance of the Gitea UI labels Oct 17, 2021
@lunny
Copy link
Member

lunny commented Oct 18, 2021

So we should also add a tea command instructions on the PR page near git one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants