git-pr-release 0.1.3 → 0.1.4

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: 14fe43fb88f31454488bea5121a298e1d07dfd41
4
- data.tar.gz: e6adcca9eb1eabda83702e00f1ea4de32026d300
3
+ metadata.gz: 7dfc39a9ba7193c744d501b73569089da4bf7248
4
+ data.tar.gz: 858cacdfd9aefd98321b96cc002ac8e11ba40b2a
5
5
  SHA512:
6
- metadata.gz: 825c19e09ee1e2e53a3b910602d42c8794bbb4f414fee77ea5be884f808ca287ad7a8efc5b37758edf6a04d83c6d70838c44a92bdc6e0bfe2c862a9da63b53a3
7
- data.tar.gz: 35337e086089c5377eca089bff7326d44026ffcf64369b07ee19c9f54db176929a152f9ad7cb49ac0672f51a1e0b136ec80b42ebd3fc7884f1145ec7f0f68550
6
+ metadata.gz: 2dcf953bab1a6fbabb335b957d3a5d153d9d92d46152eb6dd958a74ac7fee74726786236728fa992941ba5824d434a767687760ab45f73f1f18b26742fb53d00
7
+ data.tar.gz: 15eaac3a65e2e8be8b15efbea3b8d4a4f39cecdcbf4ef96e49a7f56d8ce073eb5d55c6184e434b75aca13eba8f9050ec7fef8bd8bb489bb3e71ed416e3230d4f
data/README.md CHANGED
@@ -60,6 +60,14 @@ Release <%= Time.now %>
60
60
  <% end -%>
61
61
  ```
62
62
 
63
+ ### `pr-release.labels`
64
+
65
+ The labels list for adding to pull requests created.
66
+ This value should be comma-separated strings.
67
+
68
+ If not specified, any labels will not be added for PRs.
69
+
70
+
63
71
  Errors and exit statuses
64
72
  ------------------------
65
73
 
@@ -75,6 +83,10 @@ exit status is 2.
75
83
 
76
84
  exit status is 3.
77
85
 
86
+ ### Failed to add labels
87
+
88
+ exit status is 4.
89
+
78
90
  Author
79
91
  ------
80
92
 
@@ -346,5 +346,18 @@ unless updated_pull_request
346
346
  exit 3
347
347
  end
348
348
 
349
+ labels = git_config('labels')
350
+ if not labels.nil? and not labels.empty?
351
+ labels = labels.split(/\s*,\s*/)
352
+ labeled_pull_request = client.add_labels_to_an_issue(
353
+ repository, release_pr.number, labels
354
+ )
355
+
356
+ unless labeled_pull_request
357
+ say 'Failed to add labels to a pull request', :error
358
+ exit 4
359
+ end
360
+ end
361
+
349
362
  say "#{create_mode ? 'Created' : 'Updated'} pull request: #{updated_pull_request.rels[:html].href}", :notice
350
363
  dump_result_as_json( release_pr, merged_prs ) if @json
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "git-pr-release"
7
- spec.version = '0.1.3'
7
+ spec.version = '0.1.4'
8
8
  spec.authors = ["motemen"]
9
9
  spec.email = ["motemen@gmail.com"]
10
10
  spec.summary = 'Creates a release pull request'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-pr-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - motemen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-15 00:00:00.000000000 Z
11
+ date: 2015-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit