danger-auto_label 1.1.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b9625df6d1d9a8bf3fff361c4f40d3d60ad6a46
4
- data.tar.gz: c6cb8f6aa92c817bd6762d9905b7041cde02baec
3
+ metadata.gz: 33222b2553a6306313b0c33a95aa9dd4546190b2
4
+ data.tar.gz: a0e22acb6e26d5b237d112a43f05578e627af17c
5
5
  SHA512:
6
- metadata.gz: d7bf2d9d0cddb9f0170f0111672d0828c721b0b03311c2f2fb22b5c32db0d186520a7c8eccf11180f5414a82c8e826c10c1ce32e413dbc7e45fb2c4de93ab0ac
7
- data.tar.gz: e752b3034e5f44a60f079eee4e618b3ba3191abb38881f2975e59668c736b2663eaab4e9db45a7c9df946bc2cd3c5f620c028132fd02dafce7f114bea4a54654
6
+ metadata.gz: 2449fc090a4bf27b33692d6f5bc5de6d998c41baf3660a8937ffca1861432545c08060db0adf654fad4ac7ea54a50cf1cae46fa9cdcf8c25203ed2598174fa87
7
+ data.tar.gz: df2df72c8959ecc3ba4941b41b278b44db9768d0c6aebd98386de49204eea4a185212e002788bdeefb4da3ccbde801c1f6c1d23b83f59f14ff7b4c0b9d51c1be
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-auto_label (1.0.0)
4
+ danger-auto_label (1.1.0)
5
5
  danger-plugin-api (~> 1.0)
6
6
 
7
7
  GEM
@@ -131,4 +131,4 @@ DEPENDENCIES
131
131
  yard (~> 0.9.12)
132
132
 
133
133
  BUNDLED WITH
134
- 1.16.0
134
+ 1.16.1
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- ### auto_label
1
+ A [Danger](http://danger.systems/ruby/) plugin. ([RubyGems](https://rubygems.org/gems/danger-auto_label))
2
+
3
+ ### danger-auto_label
2
4
 
3
5
  No more set label to issue or pull request manually.
4
6
  Example, you can set labels simply by changing the PR title.
@@ -20,6 +22,8 @@ Set wip label automatically when the PR title contains '[WIP]'.
20
22
  ```sample.rb
21
23
  if github.pr_title.include? "[WIP]"
22
24
  auto_label.wip=(github.pr_json["number"])
25
+ else
26
+ auto_label.delete("WIP")
23
27
  end
24
28
  ```
25
29
 
@@ -28,3 +32,5 @@ Set wip label automatically when the PR title contains '[WIP]'.
28
32
  `wip=` - Set WIP label to PR.
29
33
 
30
34
  `set` - Set any labels to PR by this.
35
+
36
+ `delete` - Delete any labels from PR.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AutoLabel
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
@@ -55,6 +55,14 @@ module Danger
55
55
  puts message
56
56
  end
57
57
 
58
+ # Delete label from PR.
59
+ # @param [String] name
60
+ # Delete label name.
61
+ # @return [void]
62
+ def delete(name)
63
+ github.api.delete_label!(repo, name)
64
+ end
65
+
58
66
  private
59
67
 
60
68
  # Add new label to repo. Use octolit api.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-auto_label
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaelaela
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-23 00:00:00.000000000 Z
11
+ date: 2018-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api