Skip to content
This repository was archived by the owner on Nov 25, 2022. It is now read-only.

Add optional target branch argument to "open-pr-github" alias#140

Merged
salcode merged 4 commits intodevelopfrom
feat/add-optional-target-branch-to-open-pr-github-139
Feb 11, 2022
Merged

Add optional target branch argument to "open-pr-github" alias#140
salcode merged 4 commits intodevelopfrom
feat/add-optional-target-branch-to-open-pr-github-139

Conversation

@salcode
Copy link
Copy Markdown
Member

@salcode salcode commented Feb 7, 2022

This PR maintains the existing behavior where

git open-pr-github

opens the GitHub URL to create a PR from the
current branch into the repo's default branch.

In addition, the command now accepts an argument
for the target (a.k.a. base) branch.

git open-pr-github my-branch

will now open a the GitHub URL to create a PR from
the current branch into the given branch ("my-branch")

Resolves #139

If argument $1 is present on git open-pr-github,
e.g.
git open-pr-github my-branch

Use $1 (my-branch) as the target branch (a.k.a. base branch) when
creating the PR URL.

If $1 is omitted, create the PR URL with no explicit target branch
(which will target the repo's default branch).

See #139
Configure open-pr-github to display branches when using tab completion,
by default Git would have autocompleted files.

See https://salferrarello.com/git-alias-tab-completion-for-functions/

See #139
@salcode salcode force-pushed the feat/add-optional-target-branch-to-open-pr-github-139 branch from 0ae311b to f36d234 Compare February 7, 2022 00:40
@salcode salcode merged commit f36d234 into develop Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modify "open-pr-github" to accept optional base branch

1 participant