git-whistles 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/bin/git-jira-pr +11 -5
- data/lib/git-whistles/version.rb +1 -1
- data/libexec/git-list-branches.sh +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 87996c40ec0e8b2b61588e2d12335de5963e5c59
|
|
4
|
+
data.tar.gz: 82e9c8d08e76cbd9d9f083daebb6ceb067e44e35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b8922895876a447737931ff47f7bfe5bb492d5f2db89c1108631c60cc488e2c66a75aa929f42ca640a29ff311b816705cc51f223f2b3cf92c02deb7ec3a53e7
|
|
7
|
+
data.tar.gz: 66bb0f204cf4da2cd7ed47dc91df475ed8b05da373e55847a89ce4eb5812923cfba872aaefd7528a5884a82b5c89480537408708813eb51ae67ee9b9edb9ada4
|
data/Gemfile.lock
CHANGED
data/bin/git-jira-pr
CHANGED
|
@@ -122,12 +122,8 @@ class App < Git::Whistles::App
|
|
|
122
122
|
|
|
123
123
|
title = "#{issue_id}: #{issue.summary}"
|
|
124
124
|
headline = "Jira story [##{issue_id}](#{@client.options[:site]}/browse/#{issue_id}) in project *#{issue.project.name}*:"
|
|
125
|
-
description = issue.description.split("\n").map do |line|
|
|
126
|
-
(1..6).each { |i| line.gsub!(/(h#{i}.)/, '#' * i) }
|
|
127
|
-
line.gsub!(/({{)|(}})/, '`')
|
|
128
|
-
"> #{line}"
|
|
129
|
-
end.join("\n")
|
|
130
125
|
|
|
126
|
+
description = safe_description(issue.description)
|
|
131
127
|
query.merge! subject: issue.summary, :"pull_request[title]" => title
|
|
132
128
|
|
|
133
129
|
if (headline.length + description.length) > SAFE_QUERY_STRING_SIZE
|
|
@@ -149,6 +145,16 @@ class App < Git::Whistles::App
|
|
|
149
145
|
end
|
|
150
146
|
end
|
|
151
147
|
|
|
148
|
+
def safe_description(description)
|
|
149
|
+
return '' unless description
|
|
150
|
+
|
|
151
|
+
description.split("\n").map do |line|
|
|
152
|
+
(1..6).each { |i| line.gsub!(/(h#{i}.)/, '#' * i) }
|
|
153
|
+
line.gsub!(/({{)|(}})/, '`')
|
|
154
|
+
"> #{line}"
|
|
155
|
+
end.join("\n")
|
|
156
|
+
end
|
|
157
|
+
|
|
152
158
|
def launch_browser(url)
|
|
153
159
|
BROWSERS.each do |command|
|
|
154
160
|
next if run("which #{command}").strip.empty?
|
data/lib/git-whistles/version.rb
CHANGED
|
@@ -8,7 +8,7 @@ PROGNAME=$(basename $0)
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
_has_git() {
|
|
11
|
-
git rev-parse
|
|
11
|
+
git rev-parse HEAD > /dev/null 2>&1
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
_check_branches_format() {
|
|
@@ -128,7 +128,7 @@ shift $((OPTIND-1))
|
|
|
128
128
|
|
|
129
129
|
[ $# -gt 0 ] && _usage && _die "Too many arguments."
|
|
130
130
|
|
|
131
|
-
_has_git ||
|
|
131
|
+
_has_git || _die "Not in a git repository !"
|
|
132
132
|
|
|
133
133
|
: ${porcelain:=no}
|
|
134
134
|
: ${where:=local}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: git-whistles
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julien Letessier
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-
|
|
12
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
203
203
|
version: 1.3.6
|
|
204
204
|
requirements: []
|
|
205
205
|
rubyforge_project:
|
|
206
|
-
rubygems_version: 2.
|
|
206
|
+
rubygems_version: 2.6.4
|
|
207
207
|
signing_key:
|
|
208
208
|
specification_version: 4
|
|
209
209
|
summary: 'A few helpers for classic Git workflows: makes branching and merging, PO
|