ljljljadslj
This commit is contained in:
15
justfile
15
justfile
@@ -709,8 +709,19 @@ pr $number=`just _a_pr`:
|
||||
)
|
||||
cd prs/pr-"$number"
|
||||
(set -x; gh pr checkout "$number")
|
||||
# git branch -D just-nixpkgs-pr-"$number"-tmp
|
||||
[[ -z "$upstream_branch" ]] || do_rebase "$upstream_branch"
|
||||
git branch -D just-nixpkgs-pr-"$number"-tmp
|
||||
# TODO: set remote tracking branch with a git or http link to the contributors fork, if not already in `git remotes`
|
||||
if [[ -n "$upstream_branch" ]]; then
|
||||
remote="$(cut <<<"$upstream_branch" -d'/' -f1)"
|
||||
branch="$(cut <<<"$upstream_branch" -d'/' -f2)"
|
||||
# TODO: gitignore ./checkout-upstream-branch.sh
|
||||
printf "#!/usr/bin/env -S bash -euo pipefail\ngit checkout --autostash %q\n" "$(git rev-parse --abbrev-ref HEAD)" > checkout-upstream-branch.sh
|
||||
chmod +x checkout-upstream-branch.sh
|
||||
(set -x;
|
||||
$GIT checkout -b pr-"$number"-rebased-"$remote"-"$branch" ||:
|
||||
$GIT pull --rebase "$remote" "$branch" || $GIT rebase --abort
|
||||
) || echo >&2 "retcode: $?" ||:
|
||||
fi
|
||||
fi
|
||||
exec just _enter_interactive_shell
|
||||
|
||||
|
||||
Reference in New Issue
Block a user