github-pivotal-flow 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41d93212c015bebe3e118fae331f0dbae4f0629b
4
- data.tar.gz: 3a1c6280059635bac3eb3e88b5fcfe89ada37a80
3
+ metadata.gz: 6904bbb1190724ba6d161da9cb6f114b179cd078
4
+ data.tar.gz: fb2de40e641e806badc7488ec11f754d08258424
5
5
  SHA512:
6
- metadata.gz: fdda8f5bae9595d3cfa1e78e436daa5dd8794b938fccb856e026072fc1cdc8f3a6504127d9255ba07fab38b326bb86ddce2f1853d70ab495cc955d3b6b21ce47
7
- data.tar.gz: b2d8b5fa2d673009dca2d83171a918048c6b4257ddd6296c2902c47721e4e0f5fc74084b55197850531e9f35f7061250645196a18ccd8c2bbb4c90a10d31835c
6
+ metadata.gz: f6cac72bf0832ac52005c74e1763918aaa15e2b5bdbc6a13dc92b55fb61afd25d7543dbac00cbedbb4c10ae4b16dc79430bbc62743d5da6e966225ddccb267ff
7
+ data.tar.gz: 910860262d23343756f408e6f4a5d086d9bd50c2686eabf0a2e9a0ccc52051e356b13996eb6887a2bc6fecf7a42d71e83b8b171b70c133e5a60d6cea0f50c8f9
data/README.md CHANGED
@@ -57,7 +57,8 @@ In order to take advantage of automatic issue completion, the [Pivotal Tracker S
57
57
  ## Commands
58
58
 
59
59
  ### `git start [ type | story-id ]`
60
- This command starts a story by creating a Git branch and changing the story's state to `started`. This command can be run in three ways. First it can be run specifying the id of the story that you want to start.
60
+ This command starts a story by creating a Git branch, opening a pull-request on Github and changing the story's state to `started`.
61
+ This command can be run in three ways. First it can be run specifying the id of the story that you want to start.
61
62
 
62
63
  ```plain
63
64
  $ git start 12345678
@@ -96,10 +97,10 @@ $ git start 12345678
96
97
  Title: Lorem ipsum dolor sit amet, consectetur adipiscing elitattributes
97
98
  Description: Ut consequat sapien ut erat volutpat egestas. Integer venenatis lacinia facilisis.
98
99
 
99
- Enter branch name (12345678-<branch-name>):
100
+ Enter branch name (feature/12345678-<branch-name>):
100
101
  ```
101
102
 
102
- The value entered here will be prepended with the story id such that the branch name is `<story-id>-<branch-name>`. This branch is then created and checked out.
103
+ The value entered here will be prepended with the story id such that the branch name is `<story-type-prefix>/<story-id>-<branch-name>`. This branch is then created and checked out.
103
104
 
104
105
  If it doesn't exist already, a `prepare-commit-msg` commit hook is added to your repository. This commit hook augments the existing commit messsage pattern by appending the story id to the message automatically.
105
106
 
@@ -117,67 +118,39 @@ If it doesn't exist already, a `prepare-commit-msg` commit hook is added to your
117
118
  ```
118
119
 
119
120
  ### `git finish [--no-complete]`
120
- This command finishes a story by merging and cleaning up its branch and then pushing the changes to a remote server. This command can be run in two ways. First it can be run without the `--no-complete` option.
121
+ This command finishes a story by merging and cleaning up its branch and then pushing the changes to a remote server.
122
+ This command can be run in two ways. First it can be run without the `--no-complete` option.
121
123
 
122
124
  ```plain
123
125
  $ git finish
124
- Checking for trivial merge from 12345678-lorem-ipsum to master... OK
125
- Merging 12345678-lorem-ipsum to master... OK
126
- Deleting 12345678-lorem-ipsum... OK
127
- Pushing to origin... OK
126
+ Checking for trivial merge from feature/63805340-sample_feature to development... OK
127
+ Merging feature/63805340-sample_feature to development... OK
128
+ Deleting feature/63805340-sample_feature... OK
128
129
  ```
129
130
 
130
- The command checks that it will be able to do a trivial merge from the development branch to the target branch before it does anything. The check has the following constraints
131
+ The command checks that it will be able to do a trivial merge from the development branch to the target branch before it does anything.
132
+ The check has the following constraints
131
133
 
132
134
  1. The local repository must be up to date with the remote repository (e.g. `origin`)
133
- 2. The local merge target branch (e.g. `master`) must be up to date with the remote merge target branch (e.g. `origin/master`)
134
- 3. The common ancestor (i.e. the branch point) of the development branch (e.g. `12345678-lorem-ipsum`) must be tip of the local merge target branch (e.g. `master`)
135
+ 2. The local merge target branch (e.g. `development`) must be up to date with the remote merge target branch (e.g. `origin/development`)
136
+ 3. The common ancestor (i.e. the branch point) of the development branch (e.g. `feature/12345678-lorem-ipsum`) must be tip of the local merge target branch (e.g. `development`)
135
137
 
136
138
  If all of these conditions are met, the development branch will be merged into the target branch with a message of:
137
139
 
138
140
  ```plain
139
- Merge 12345678-lorem-ipsum to master
141
+ Merge feature/12345678-lorem-ipsum to development
140
142
 
141
143
  [Completes #12345678]
142
144
  ```
143
145
 
144
- The second way is with the `--no-complete` option specified. In this case `finish` performs the same actions except the `Completes`... statement in the commit message will be supressed.
146
+ The second way is with the `--no-complete` option specified.
147
+ In this case `finish` performs the same actions except the `Completes`... statement in the commit message will be supressed.
145
148
 
146
149
  ```plain
147
- Merge 12345678-lorem-ipsum to master
150
+ Merge feature/12345678-lorem-ipsum to development
148
151
 
149
152
  [#12345678]
150
153
  ```
151
154
 
152
155
  After merging, the development branch is deleted and the changes are pushed to the remote repository.
153
156
 
154
- ### `git release [story-id]`
155
- This command creates a release for a story. It does this by updating the version string in the project and creating a tag. This command can be run in two ways. First it can be run specifying the release that you want to create.
156
-
157
- ```plain
158
- $ git release 12345678
159
- ```
160
- The other way the command can be run without specifying anything. In this case, it will select the first release story (based on the backlog's order).
161
-
162
- ```plain
163
- $ git release
164
- Title: Lorem ipsum dolor sit amet, consectetur adipiscing elitattributes
165
- ```
166
-
167
- Once a story has been selected by one of the two methods, the command then prompts for the release version and next development version.
168
-
169
- ```plain
170
- $ git release
171
- Title: Lorem ipsum dolor sit amet, consectetur adipiscing elitattributes
172
-
173
- Enter release version (current: 1.0.0.BUILD-SNAPSHOT): 1.0.0.M1
174
- Enter next development version (current: 1.0.0.BUILD-SNAPSHOT): 1.1.0.BUILD-SNAPSHOT
175
- Creating tag v1.0.0.M1... OK
176
- Pushing to origin... OK
177
- ```
178
-
179
- Once these have been entered, the version string for the current project is updated to the release version and a tag is created. Then the version string for the current project is updated to the next development version and a new commit along the original branch is created. Finally the tag and changes are pushed to the remote sever.
180
-
181
- Version update is currently supported for the following kinds of projects. If you do not see a project type that you would like supported, please open an issue or submit a pull request.
182
-
183
- * Gradle
@@ -14,7 +14,7 @@ module GithubPivotalFlow
14
14
  def initialize(*args)
15
15
  @options = {}
16
16
  args = parse_argv(*args)
17
- @options[:args] = args
17
+ _, _, @options[:args] = args
18
18
 
19
19
  @repository_root = Git.repository_root
20
20
  @configuration = Configuration.new(@options)
@@ -73,8 +73,9 @@ module GithubPivotalFlow
73
73
  feature_prefix = Git.get_config KEY_FEATURE_PREFIX, :inherited
74
74
 
75
75
  if feature_prefix.empty?
76
- feature_prefix = ask('Please enter your git-flow feature branch prefix: [feature]').strip
77
- feature_prefix = 'feature' if feature_prefix.blank?
76
+ feature_prefix = ask('Please enter your git-flow feature branch prefix: [feature/]').strip
77
+ feature_prefix = 'feature/' if feature_prefix.blank?
78
+ feature_prefix = "#{feature_prefix}/" unless feature_prefix[-1,1] == '/'
78
79
  Git.set_config KEY_FEATURE_PREFIX, feature_prefix, :local
79
80
  puts
80
81
  end
@@ -86,8 +87,9 @@ module GithubPivotalFlow
86
87
  hotfix_prefix = Git.get_config KEY_HOTFIX_PREFIX, :inherited
87
88
 
88
89
  if hotfix_prefix.empty?
89
- hotfix_prefix = ask('Please enter your git-flow hotfix branch prefix: [hotfix]').strip
90
- hotfix_prefix = 'hotfix' if hotfix_prefix.blank?
90
+ hotfix_prefix = ask('Please enter your git-flow hotfix branch prefix: [hotfix/]').strip
91
+ hotfix_prefix = 'hotfix/' if hotfix_prefix.blank?
92
+ hotfix_prefix = "#{hotfix_prefix}/" unless hotfix_prefix[-1,1] == '/'
91
93
  Git.set_config KEY_HOTFIX_PREFIX, hotfix_prefix, :local
92
94
  puts
93
95
  end
@@ -99,8 +101,9 @@ module GithubPivotalFlow
99
101
  release_prefix = Git.get_config KEY_RELEASE_PREFIX, :inherited
100
102
 
101
103
  if release_prefix.empty?
102
- release_prefix = ask('Please enter your git-flow release branch prefix: [release]').strip
104
+ release_prefix = ask('Please enter your git-flow release branch prefix: [release/]').strip
103
105
  release_prefix = 'release' if release_prefix.blank?
106
+ release_prefix = "#{release_prefix}/" unless release_prefix[-1,1] == '/'
104
107
  Git.set_config KEY_RELEASE_PREFIX, release_prefix, :local
105
108
  puts
106
109
  end
@@ -3,6 +3,7 @@ module GithubPivotalFlow
3
3
  class Start < GithubPivotalFlow::Command
4
4
  def run!
5
5
  filter = @options[:args]
6
+ puts "Filter: #{filter.inspect}"
6
7
  #TODO: Validate the format of the filter argument
7
8
  story = Story.select_story @project, filter
8
9
  Story.pretty_print story
@@ -145,9 +145,9 @@ module GithubPivotalFlow
145
145
  def branch_name_from(branch_prefix, story_id, branch_name)
146
146
  if story_type == 'release'
147
147
  # For release branches the format is release/5.0
148
- "#{Git.get_config('gitflow.prefix.release', :inherited)}/#{branch_name}"
148
+ "#{Git.get_config('gitflow.prefix.release', :inherited)}#{branch_name}"
149
149
  else
150
- n = "#{branch_prefix}/#{story_id}"
150
+ n = "#{branch_prefix}#{story_id}"
151
151
  n << "-#{branch_name}" unless branch_name.blank?
152
152
  n
153
153
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-pivotal-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Piret
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-16 00:00:00.000000000 Z
11
+ date: 2014-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline