feat: configure personal pull request review indicators
This commit is contained in:
@@ -157,6 +157,8 @@ module Vamp
|
||||
@diff_view_mode = "split"
|
||||
@diff_split_orientation = "vertical"
|
||||
@diff_follow_working_copy = true
|
||||
@pull_request_review_requested_symbol = "🙏"
|
||||
@pull_request_approved_symbol = "👍"
|
||||
@resolve_history_layout = "columns"
|
||||
end
|
||||
|
||||
@@ -327,6 +329,18 @@ module Vamp
|
||||
@diff_follow_working_copy = enabled
|
||||
end
|
||||
|
||||
# @param symbol [String] empty to hide the review-request indicator
|
||||
# @return [String]
|
||||
def pull_request_review_requested_symbol=(symbol)
|
||||
@pull_request_review_requested_symbol = pull_request_symbol!(symbol, "pull_request_review_requested_symbol")
|
||||
end
|
||||
|
||||
# @param symbol [String] empty to hide the approval indicator
|
||||
# @return [String]
|
||||
def pull_request_approved_symbol=(symbol)
|
||||
@pull_request_approved_symbol = pull_request_symbol!(symbol, "pull_request_approved_symbol")
|
||||
end
|
||||
|
||||
# @param layout [String] "columns" or "base_below"
|
||||
# @return [String]
|
||||
def resolve_history_layout=(layout)
|
||||
@@ -382,10 +396,19 @@ module Vamp
|
||||
"diff_context_lines" => @diff_context_lines, "diff_expand_lines" => @diff_expand_lines,
|
||||
"diff_view_mode" => @diff_view_mode, "diff_split_orientation" => @diff_split_orientation,
|
||||
"diff_follow_working_copy" => @diff_follow_working_copy,
|
||||
"pull_request_review_requested_symbol" => @pull_request_review_requested_symbol,
|
||||
"pull_request_approved_symbol" => @pull_request_approved_symbol,
|
||||
"resolve_history_layout" => @resolve_history_layout }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def pull_request_symbol!(symbol, label)
|
||||
symbol = Vamp.string!(symbol, label)
|
||||
raise ArgumentError, "#{label} must not contain control characters" if symbol.match?(/[[:cntrl:]]/)
|
||||
|
||||
symbol
|
||||
end
|
||||
# @param spaces [Integer, nil]
|
||||
# @return [Integer, nil]
|
||||
def tab_spaces!(spaces)
|
||||
|
||||
Reference in New Issue
Block a user