refactor: combine bin directories
This commit is contained in:
parent
f3f1051f1f
commit
459428a979
16 changed files with 0 additions and 38 deletions
26
bin/git-opr
Executable file
26
bin/git-opr
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ensure_is_published() {
|
||||
[[ ! $is_published ]] && git publish
|
||||
}
|
||||
|
||||
is_published() {
|
||||
echo $(git upstream)
|
||||
}
|
||||
|
||||
open_or_build_pull_request() {
|
||||
type gh &>/dev/null
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: gh command not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Load an existing PR, or create a new one.
|
||||
gh pr view --web || gh pr create --assignee opdavies --web
|
||||
}
|
||||
|
||||
ensure_is_published
|
||||
open_or_build_pull_request
|
Loading…
Add table
Add a link
Reference in a new issue