-
Notifications
You must be signed in to change notification settings - Fork 61
Merge PRs locally #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -184,6 +184,13 @@ If `issue' is nil, open the repository's issues page." | |
| (plist-get issue :url) | ||
| (car (magithub--command-output "browse" '("--url-only" "--" "issues")))))) | ||
|
|
||
| (defun magithub-pr-merge-locally (issue) | ||
| "Merges `issue' locally using `hub am -3'." | ||
| (interactive (list (magit-section-value | ||
| (magit-current-section)))) | ||
| (magithub--command-output "am" `("-3" ,(plist-get issue :url))) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, All this could be mitigated by using magit's am sequencer. |
||
| (magithub-issue-refresh)) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity, why was this necessary? If we're applying the merge locally, that shouldn't impact GitHub's data. |
||
|
|
||
| (defun magithub-issue-refresh () | ||
| (interactive) | ||
| (magithub-cache-clear (magithub-repo-id) :issues) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,7 @@ | |
| (?f "Fork" magithub-fork-popup) | ||
| (?i "Issues" magithub-issues-popup) | ||
| (?p "Submit a pull request" magithub-pull-request-popup) | ||
| (?m "Merge a pull request locally" magithub-pr-merge-locally) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do agree this is pretty strange. It'd be nice to have this as actionable from the pull-request itself. This popup seems more oriented to actions that are 'original sins' in a way (with the possible exception of submitting a pull request being based on a branch). |
||
| "Meta" | ||
| (?` "Toggle Magithub-Status integration" magithub-enabled-toggle) | ||
| (?g "Refresh all GitHub data" magithub-refresh) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module/package/namespace is
magithub-issue, so this would rather be named something likemagithub-issue-merge-pr-locally.