Skip to content
This repository was archived by the owner on Mar 3, 2022. It is now read-only.

WIP: Pulls #158

Closed
wants to merge 109 commits into from
Closed

WIP: Pulls #158

wants to merge 109 commits into from

Conversation

LFDM
Copy link
Collaborator

@LFDM LFDM commented Mar 2, 2014

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 :)

LFDM added 30 commits February 27, 2014 13:19
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.
LFDM added 17 commits February 28, 2014 01:43
Refactor handling of lines to ignore in templates. Currently only used
by the Pull class, but could clean up things elsewhere.
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.
@laughedelic
Copy link

what's up here? ")

@lzap
Copy link

lzap commented Jun 2, 2014

We are blocked by this one :-)

@ktoso
Copy link

ktoso commented Jul 13, 2014

Great one, would love to use this :-)

@dennisquintel
Copy link

Would love to use this! 👍

@AlexChesters
Copy link
Contributor

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?

@karlhorky
Copy link

+1 would like to have this as well

@AlexChesters
Copy link
Contributor

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.

@AlexChesters
Copy link
Contributor

I've created #256 for this

@dennisquintel
Copy link

dennisquintel commented Oct 18, 2015 via email

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants