This repository was archived by the owner on Mar 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 135
WIP: Pulls #158
Closed
WIP: Pulls #158
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prepare addition of pull command
Adds formatting methods for upcoming pull show command
Doesn't even exist in the API
All subcommands get their own class. Files for not yet implemented subcommands are also setup to avoid breakage.
That functionality is already implemented in the same module
Diff output shows minor inconsistencies
- Aliases is now an own command, which displays available aliases - Move alias logic from GHI to Aliases
All subcommands of pull start their execution with the same logic.
Check the comment attached. Threw an error when a pull request without line changes was submitted.
GitHub says 'able to merge', let's use that too.
Refactor handling of lines to ignore in templates. Currently only used by the Pull class, but could clean up things elsewhere.
Just use a file ending...
Can be detected by editors - the soon to be released vim-ghi plugin is an example for that.
... to strip away everything we want ignored.
The inserted placeholder needs to be surrounded with newlines. If it doesn't sit on his own line, he destroys the normal formatting of the diff - the format_diff method won't be happy.
Something along the following imposed problems: + + def The second line would not be highlighted properly, but only when the pager is active. The [^\+] part of the regex always matched the newline following the '+' on the first line, the regex therefore matched multiple lines and took the '+ def' with it - the reset color escape sequence was put in right after the second line. This is not a problem for a regular ruby puts, which flushes $stdout at once, the highlighting can span multiple lines that way. However with a pager like less every line gets printed on the screen naturally - the second line had no escape sequence, it was white. Everything's fine now.
Comments don't get rendered if the new object is without that info.
The subcommands need the repo instance variable passed, otherwise the Pull class obtains the repo and leaves the subcommand instance without any knowledge of this.
This led to an ad infinitum paging output.
what's up here? ") |
We are blocked by this one :-) |
Great one, would love to use this :-) |
Would love to use this! 👍 |
Hi @LFDM, This is a great idea! I see this is a particularly large PR with merge conflicts that hasn't been touched in a while. Do you still intend to merge this in? |
+1 would like to have this as well |
This is a great idea but seeing as how this is a particularly large PR, with merge conflicts, that is buggy I don't think we're in a position to merge this. |
I've created #256 for this |
👍
|
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Interface to GitHub's Pull Request API. Quite massive.
Will add a description at a later point, this is currently here for
easier referencing.
Very much work in progress with rough patches and some nasty bugs right now :)