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
Changes from 1 commit
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
59442f7
Refactor output of an issue's comment in Show
LFDM Feb 25, 2014
e9d7f94
Prepare Formatter for Pull
LFDM Feb 25, 2014
63f7159
Start Pull command with show subcommand
LFDM Feb 25, 2014
68cfd80
Adds options to Pull#show
LFDM Feb 26, 2014
aaa6a40
Implement
LFDM Feb 26, 2014
b1241af
Add display of commits for pull requests
LFDM Feb 26, 2014
9cc7a69
Truncate overly long messages in pull show -c
LFDM Feb 26, 2014
0fcb4fe
Delete pull show --files option
LFDM Feb 26, 2014
3c7ee5a
Start help screen for Pull
LFDM Feb 26, 2014
3868277
Show head and base branch in Pull#show
LFDM Feb 26, 2014
dbc0863
Abort with invalid subcommands in Pull
LFDM Feb 26, 2014
f16f0e9
Extract class in Pull
LFDM Feb 26, 2014
0a87264
Add first aliases for pull command(s)
LFDM Feb 26, 2014
a96de26
Add diff to Pull::Show
LFDM Feb 26, 2014
263752f
Add patch to Pull::Show
LFDM Feb 26, 2014
5d45318
Delete new truncate method in Formatting
LFDM Feb 26, 2014
51218cc
Format diff output for Pull::Show
LFDM Feb 26, 2014
58815c6
Format patch output in Pull::Show and refactor
LFDM Feb 26, 2014
169eb65
Add FIXME note to Formatting
LFDM Feb 26, 2014
ed0aede
Improve help for Pull
LFDM Feb 26, 2014
865b661
Add fetch command for Pull
LFDM Feb 26, 2014
aee561e
Add pull fetch alias
LFDM Feb 26, 2014
a69ed9f
Shift order of Pull subcommands in help
LFDM Feb 26, 2014
166d7a8
Add TODO note about proper handling of pr fetching
LFDM Feb 26, 2014
1825f01
Move aliases to own class
LFDM Feb 26, 2014
5505716
Extract method subcommand_execute in Pull
LFDM Feb 26, 2014
c724d8c
Fix bug in Formatter#change_viz
LFDM Feb 26, 2014
91dbcc3
First running implementation of the merge button
LFDM Feb 26, 2014
2f859f6
Fix mergeability string in Formatting
LFDM Feb 26, 2014
2676c69
Add info for dirty pull requests in Pull::Show
LFDM Feb 26, 2014
2b82240
Refactor pr in Pull
LFDM Feb 26, 2014
38ba143
Add methods to compare head and base in Pull
LFDM Feb 26, 2014
da3f8f7
Show if a rebase is needed in Pull::Show
LFDM Feb 26, 2014
8a8bc7b
Handle errors and warning in Pull::Merge
LFDM Feb 26, 2014
086dc15
Shorten option description for ghi pull merge -m
LFDM Feb 26, 2014
76022fc
Allow to pull or rebase locally after merge
LFDM Feb 26, 2014
ec70442
Fix obsolete method name in Pull::Merge
LFDM Feb 26, 2014
f34c16c
Extract current_branch, upstream and origin
LFDM Feb 26, 2014
0c8fc6f
Add new interface for Editor
LFDM Feb 26, 2014
d0d7f35
Add pull create alias pc
LFDM Feb 26, 2014
e80337e
First running implementation of Pull::Create
LFDM Feb 26, 2014
93b5905
Refactor subcommand_execute in Pull
LFDM Feb 26, 2014
a4a6b74
Add option to show a created pull request
LFDM Feb 26, 2014
53f56c6
Add comments for error handling in Pull::Create
LFDM Feb 26, 2014
9cba273
Catch no arg at all an Pull#handle_help_request
LFDM Feb 26, 2014
98a3627
Minor refactor in Show
LFDM Feb 26, 2014
68b1493
Add Pull::Close
LFDM Feb 26, 2014
80dce7f
Delete unused method in Pull::Create
LFDM Feb 26, 2014
98bb046
Minor fix and renaming in Pull::Create
LFDM Feb 26, 2014
1ad1173
Don't pollute the editor content with nil.to_s
LFDM Feb 26, 2014
22b7116
Adds method to check for changes in Editor
LFDM Feb 26, 2014
dd3760e
Always unlink in editor - and add a lengthy note
LFDM Feb 26, 2014
3d9ad38
Add alias pe for pull edit
LFDM Feb 26, 2014
09436ab
Implements editing of pull requests in Pull::Edit
LFDM Feb 26, 2014
e5de658
Stylistic refactor in Formatting
LFDM Feb 27, 2014
9814f60
Delete obsolete blk params in Pull::Merge#options
LFDM Feb 27, 2014
8ed9281
Always return diff in format_diff
LFDM Feb 27, 2014
7eb0dd8
Avoid lurking bug - don't use + with strings
LFDM Feb 27, 2014
86b65f3
Move show_pull_request to Pull
LFDM Feb 27, 2014
c8d48e3
Unify interfaces and logic in Pull::Close and Edit
LFDM Feb 27, 2014
a6baeb2
Unify Pull::Create and document what's happening
LFDM Feb 27, 2014
0ad80aa
Use heredoc in Pull::Merge
LFDM Feb 27, 2014
b4d6b8f
Add TODO about messaging in Pull::Merge
LFDM Feb 27, 2014
0d1270f
Add comments about the prohibition of empty bodies
LFDM Feb 27, 2014
d804196
Resolve edit problems in Editor
LFDM Feb 27, 2014
f27f661
Remove an obsolete comment
LFDM Feb 27, 2014
a5e1695
Improve help messages
LFDM Feb 27, 2014
917e316
Add pull to global help screen
LFDM Feb 27, 2014
92138a1
Allow message through editor in Pull::Merge
LFDM Feb 27, 2014
ad95e4c
Refactor change_viz in Formatter
LFDM Feb 27, 2014
db2d1d3
Refactor in Pull::Show
LFDM Feb 27, 2014
ec2213e
Fix typo in change_viz of Formatter
LFDM Feb 27, 2014
e26a7f8
Show files in Pull::Show through option -f
LFDM Feb 27, 2014
f8bb971
Better formatting in Formatting#format_file
LFDM Feb 27, 2014
d7a13d0
Extract constants in Formatting
LFDM Feb 27, 2014
9ba4e4c
Fix diff output in Pull::Show
LFDM Feb 27, 2014
11320bd
Add default value to Command#initialize param
LFDM Feb 27, 2014
08f31df
Move pull_uri up one step and extract issue_uri
LFDM Feb 27, 2014
89bd7d2
Make pr writable, show_pull_request readable in PR
LFDM Feb 27, 2014
888b4fb
Flexibly show issues or pull requests in Show
LFDM Feb 27, 2014
2332936
Better help string for ghi show <issueno> -w
LFDM Feb 27, 2014
a83b56c
Refactor Editor#extract_keyword
LFDM Feb 27, 2014
d0d11c9
Refactor a leftover
LFDM Feb 27, 2014
8f80a64
Extract multithreading method from Show to Command
LFDM Feb 27, 2014
63b4f4e
First implementation of diffing with comments
LFDM Feb 27, 2014
ae363f9
Hell yeah! Add review comment creation for Pull
LFDM Feb 27, 2014
276c094
Add rich documentation on review comments.
LFDM Feb 28, 2014
b3953ca
Extract class Pull::Diff from Pull::Show
LFDM Feb 28, 2014
433ed07
Get rid action @action in Pull::Diff
LFDM Feb 28, 2014
bba6ba6
Typo
LFDM Feb 28, 2014
75d18f8
Reroute `ghi pull show <no> -d` to Diff class
LFDM Feb 28, 2014
4fd3ace
Add comment about weird paging in Pull::Diff
LFDM Feb 28, 2014
590b292
Add pull diff alias pd
LFDM Feb 28, 2014
990db55
Add spacing to pull help messages
LFDM Feb 28, 2014
d33d278
Add explanation how to create review comments
LFDM Feb 28, 2014
4911579
Extract IGNORE_MARKER - used in templates.
LFDM Feb 28, 2014
da104a1
Refactor diff filetype detection in Pull::Diff
LFDM Feb 28, 2014
c2be53a
Add .ghi endings to Pull template files
LFDM Feb 28, 2014
4969f1c
Use the IGNORE_MARKER inside the templates as well
LFDM Feb 28, 2014
d31a044
Make use of IGNORE_MARKER in Editor
LFDM Feb 28, 2014
22ea2d4
Forgot to use IGNORE_MARKER in Pull::Merge as well
LFDM Feb 28, 2014
f9cc027
Fix little formatting bug with diff comments
LFDM Feb 28, 2014
91e2185
Fix minor formatting problem in format_diff
LFDM Feb 28, 2014
3f885fa
Update Pull::Create template
LFDM Feb 28, 2014
5bda1e2
Update Pull::Edit template
LFDM Feb 28, 2014
d4c3e47
Add Pull files and Aliases to Rakefile's manifest
LFDM Mar 2, 2014
783c8a7
Pass repo and issue in hybrid Show command.
LFDM Mar 3, 2014
9160321
Fix explicit repo handling in Pull
LFDM Mar 3, 2014
63266e5
Add missing break in page block of Pull::Diff
LFDM Mar 3, 2014
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
Prev Previous commit
Next Next commit
Delete new truncate method in Formatting
That functionality is already implemented in the same module
  • Loading branch information
LFDM committed Feb 27, 2014
commit 5d45318fd1e40bbdf4ebf263ec905b795d7b6624
12 changes: 1 addition & 11 deletions lib/ghi/formatting.rb
Original file line number Diff line number Diff line change
@@ -438,17 +438,7 @@ def format_commit(commit, indent = 4, width = columns)
indent = ' ' * indent
sha = commit['sha'][0..6]
title = commit['commit']['message'].split("\n\n").first
"#{indent}* #{sha} | #{truncate(title, width - 20)}"
end

def truncate(str, size)
if str.size > size
res = str[0..(size - 3)]
last_whitespace = res.rindex(' ')
str[0..last_whitespace] + '...'
else
str
end
"#{indent}* #{sha} | #{truncate(title, 20)}"
end

#--