Skip to content

Commit

Permalink
Apply minor fixes before the release of v3.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelLipski committed Oct 20, 2023
1 parent 5dded0c commit 9be9752
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
## New in git-machete 3.20.0

- added: `git machete github create-pr` adds a comment linking the PR to its base PR; `github retarget-pr` keeps that comment up to date (suggested by @guyboltonking)
- added: new subcommand `git machete github restack-pr`, which first marks the PR as draft, then (force-)pushes branch, then retargets PR, then marks as ready for review again (suggested by @raylu)

## New in git-machete 3.19.1

- added: new subcommand `git machete github restack-pr`, which (force-)pushes and retargets the PR, without adding code owners as reviewers in the process (suggested by @raylu)
- improved: when running `git machete squash` against a root branch, the error message suggests using `--fork-point=...` flag (suggested by @levinotik)
- improved: simplified & clarified docs in multiple places (partly suggested by @kgadek)

Expand Down
2 changes: 1 addition & 1 deletion completion/git-machete.completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ __git_machete_github_subcommands() {
'anno-prs:annotate the branches based on their corresponding GitHub PR numbers and authors'
'checkout-prs:check out the given pull requests locally'
'create-pr:create a PR for the current branch, using the upstream (parent) branch as the PR base'
'restack-pr:retarget and (force-)push the PR, without adding code owners as reviewers in the process'
'restack-pr:(force-)push and retarget the PR, without adding code owners as reviewers in the process'
'retarget-pr:set the base of the current branch PR to upstream (parent) branch'
'sync:synchronize with the remote repository: checkout open PRs for the current user associated with the GitHub token, delete unmanaged branches and also delete untracked managed branches with no downstream branch'
)
Expand Down
2 changes: 1 addition & 1 deletion completion/git-machete.fish
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands"
complete -c git-machete -n "__fish_seen_subcommand_from github; and not __fish_seen_subcommand_from anno-prs checkout-prs create-pr restack-pr retarget-pr sync" -f -a anno-prs -d 'Annotates the branches based on their corresponding GitHub PR numbers and authors'
complete -c git-machete -n "__fish_seen_subcommand_from github; and not __fish_seen_subcommand_from anno-prs checkout-prs create-pr restack-pr retarget-pr sync" -x -a checkout-prs -d 'Check out the head branch of the given pull requests (specified by number), also traverse chain of pull requests upwards, adding branches one by one to git-machete and check them out locally'
complete -c git-machete -n "__fish_seen_subcommand_from github; and not __fish_seen_subcommand_from anno-prs checkout-prs create-pr restack-pr retarget-pr sync" -f -a create-pr -d 'Creates a PR for the current branch, using the upstream (parent) branch as the PR base'
complete -c git-machete -n "__fish_seen_subcommand_from github; and not __fish_seen_subcommand_from anno-prs checkout-prs create-pr restack-pr retarget-pr sync" -f -a restack-pr -d 'Retargets and (force-)pushes the PR, without adding code owners as reviewers in the process'
complete -c git-machete -n "__fish_seen_subcommand_from github; and not __fish_seen_subcommand_from anno-prs checkout-prs create-pr restack-pr retarget-pr sync" -f -a restack-pr -d '(Force-)pushes and retargets the PR, without adding code owners as reviewers in the process'
complete -c git-machete -n "__fish_seen_subcommand_from github; and not __fish_seen_subcommand_from anno-prs checkout-prs create-pr restack-pr retarget-pr sync" -f -a retarget-pr -d 'Sets the base of PR for the current branch to upstream (parent) branch, as seen by git machete (see git machete show up)'
complete -c git-machete -n "__fish_seen_subcommand_from github; and not __fish_seen_subcommand_from anno-prs checkout-prs create-pr restack-pr retarget-pr sync" -f -a sync -d 'Synchronize with the remote repository: checkout open PRs for the current user associated with the GitHub token, delete unmanaged branches and also delete untracked managed branches with no downstream branch'
complete -c git-machete -n "__fish_seen_subcommand_from github; and __fish_seen_subcommand_from checkout-prs; and not __fish_seen_subcommand_from --all" -f -l all -d 'Checkout all open PRs'
Expand Down
2 changes: 2 additions & 0 deletions git_machete/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ def set_draft_status_of_pull_request(self, number: int, target_draft_status: boo
debug(f"PR #{number} is already a draft")
return False
if not is_draft and target_draft_status is False:
# This case is not covered by tests since there's currently no scenario
# in `git machete github restack-pr` that could reach here.
debug(f"PR #{number} is already ready for review")
return False

Expand Down

0 comments on commit 9be9752

Please sign in to comment.