Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/commands/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@
end
end

desc "Fetch a specified pull request and rebase it to the current tip"
usage "github fetch-pull [pullRequestId]"
command :'fetch-pull' do |n|
desc "Fetch a pull request and possibly rebase or merge it to the current tip"
usage "github fetch-pull [pullRequestId] [rebase | merge]"
command :'fetch-pull' do |n,action|
user, repo = nil,nil
# figure out the user+repo name from git-remote
git("remote -v").split("\n").each do |line|
Expand Down Expand Up @@ -299,5 +299,5 @@
end
pgit "fetch #{repo_url}.git #{head['ref']}:pull-#{n}"
pgit "checkout pull-#{n}"
pgit "rebase #{tip}"
pgit "#{action} #{tip}" if ["rebase", "merge"].include?(action)
end