pivotoolz 0.2.0 → 1.0.0
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 +5 -5
- data/README.md +6 -11
- data/assets/pv-git-branch-demo.gif +0 -0
- data/lib/pivotoolz/git_branch.rb +6 -2
- data/lib/pivotoolz/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c9bbddb0c21ad076943ee1ce72ab6cafd41459aeaf552e6fd74d30bc6065f60b
|
4
|
+
data.tar.gz: e582a7305bed0b5ac27c28ad1810d10587c379fc674ce8b908ec9047246aae06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bed0db6bf96b4e83026a8799e2647070649227548f7efab6b6d52fc9055d32d21517a9d5b0d07ff2e383414b03b57aa2982b8fa124016a692c7784e01c5c96c
|
7
|
+
data.tar.gz: 4a648482e7ef1b245d1b5b6a35af088c42bbbc306b81554d3ed76de60859853a7660527a0d32eb08e01ca64b619233067cdbec5c21558d83e743ca2416cb3724
|
data/README.md
CHANGED
@@ -182,23 +182,18 @@ example:
|
|
182
182
|
### `pv-git-branch`
|
183
183
|
|
184
184
|
Wouldn't it be nice to have all your Git branch names consistent with your dev team? Well now
|
185
|
-
you can with `pv-git-branch`. Just pass `pv-git-branch` a Pivotal Story ID, and it will
|
186
|
-
branch
|
187
|
-
name and the pivotal story id.
|
188
|
-
|
185
|
+
you can with `pv-git-branch`. Just pass `pv-git-branch` a Pivotal Story ID as a string, and it will create a new
|
186
|
+
branch for you based on author name, the pivotal story category, the pivotal story
|
187
|
+
name and the pivotal story id.
|
188
|
+
Be sure to set your `PIVOTAL_TRACKER_API_TOKEN` env variable in your `.bashrc` file. If you want to explicitly set your initials as the author name,
|
189
189
|
set your git config user initials like this: `git config --add user.initials af`. Otherwise it
|
190
190
|
will take your `git config user.name` or `whoami` information.
|
191
191
|
|
192
192
|
Example:
|
193
193
|
```bash
|
194
|
-
pv-git-branch 111222333
|
195
|
-
```
|
196
|
-
This would return something like: `af/features/building-someting-greate-111222333`
|
197
|
-
|
198
|
-
So it can be used with git like this:
|
199
|
-
```bashr
|
200
|
-
git checkout -b $(pv-git-branch 111222333)
|
194
|
+
pv-git-branch "#111222333"
|
201
195
|
```
|
196
|
+
This would create and checkout a new branch: `af/features/building-someting-great-111222333`
|
202
197
|
|
203
198
|

|
204
199
|
|
Binary file
|
data/lib/pivotoolz/git_branch.rb
CHANGED
@@ -14,11 +14,15 @@ class GitBranch
|
|
14
14
|
description = set_description(story['name'])
|
15
15
|
pivotal_id = story['id']
|
16
16
|
|
17
|
-
"#{author}/#{category}/#{description}-#{pivotal_id}"
|
17
|
+
create_branch("#{author}/#{category}/#{description}-#{pivotal_id}")
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
+
def create_branch(branch_name)
|
23
|
+
`git checkout -b #{branch_name}`
|
24
|
+
end
|
25
|
+
|
22
26
|
def get_pivotal_story(pivotal_id)
|
23
27
|
unless ENV['PIVOTAL_TRACKER_API_TOKEN']
|
24
28
|
puts "!: You need to set the 'PIVOTAL_TRACKER_API_TOKEN' environment variable"
|
@@ -63,6 +67,6 @@ class GitBranch
|
|
63
67
|
end
|
64
68
|
|
65
69
|
def self.usage_message
|
66
|
-
"Usage :
|
70
|
+
"Usage : pv-git-branch '[pivotal_story_id]'"
|
67
71
|
end
|
68
72
|
end
|
data/lib/pivotoolz/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivotoolz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sufyan Adam
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.7.7
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Tools to save you time when working with Pivotal Tracker stories
|