gitlab-triage 0.2.1 → 0.3.0

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
  SHA256:
3
- metadata.gz: 2eee07dd4f1d079a8d01db15b7f0bf1e1eab8d2050436aaa45aba8fb09f3520f
4
- data.tar.gz: 290a8631a19d5a9dcd1e5260bc2a655b6cf37d83c2afc885aa2dc40ae6dbe6f7
3
+ metadata.gz: 9f66d8205af90c7d802349af07f84b1dd4479e8fda279f2cbcd6732fca07e19a
4
+ data.tar.gz: 2c2915b5044889177e1fab61d9a7c30755a5629bd95352b044aaf43c794dd9cb
5
5
  SHA512:
6
- metadata.gz: 6b9f140f10cad6b738d8201c6e6de65db2dd8c4ed15cad7ac6f75ef96be16f8c043b4607c3807d812556d64943484b00c0ad8199d38e3c4178be89d7d2e1f521
7
- data.tar.gz: 8b55bb9ba28b4d14f5b218b502be0fbf5c5a84e678d9aa1782916157027b86123f14c2a7b45d373f47d8855544ac1e6575aaea5de2519905b435d5074952378b
6
+ metadata.gz: 7032c596be646b9119be23d50f29538734b810b7b1565c7ff814e672f6d444a8c1f666779764e4ef83a1cc915d49a8fb2a99747b9921ef9653f6c06a90ec30e4
7
+ data.tar.gz: 865d9321ce3ae41de914ef51daf621eb3208e77029e192e58166ac481ff612793801d4d9ad1d2e5e4f6dfd8180ec0c1f3eebbe37f559e60300e1e917af5e1f40
data/README.md CHANGED
@@ -194,6 +194,7 @@ Used to declare an action to be carried out on a resource if **all** conditions
194
194
 
195
195
  Available action types:
196
196
  - [`labels` action](#labels-action)
197
+ - [`remove_labels` action](#remove-labels-action)
197
198
  - [`status` action](#status-action)
198
199
  - [`mention` action](#mention-action)
199
200
  - [`comment` action](#comment-action)
@@ -213,6 +214,21 @@ actions:
213
214
  - awaiting feedback
214
215
  ```
215
216
 
217
+ ##### Remove labels action
218
+
219
+ Removes a number of labels from the resource.
220
+
221
+ Accepts an array of strings. Each element is the name of a label to remove.
222
+
223
+ Example:
224
+
225
+ ```yml
226
+ actions:
227
+ remove_labels:
228
+ - feature proposal
229
+ - awaiting feedback
230
+ ```
231
+
216
232
  ##### Status action
217
233
 
218
234
  Changes the status of the resource.
@@ -0,0 +1,15 @@
1
+ require_relative 'base_command_builder'
2
+
3
+ module Gitlab
4
+ module Triage
5
+ module CommandBuilders
6
+ class RemoveLabelCommandBuilder < LabelCommandBuilder
7
+ private
8
+
9
+ def slash_command_string
10
+ '/unlabel'
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -5,6 +5,7 @@ require_relative 'limiters/votes_conditions_limiter'
5
5
  require_relative 'limiters/forbidden_labels_conditions_limiter'
6
6
  require_relative 'command_builders/comment_command_builder'
7
7
  require_relative 'command_builders/label_command_builder'
8
+ require_relative 'command_builders/remove_label_command_builder'
8
9
  require_relative 'command_builders/cc_command_builder'
9
10
  require_relative 'command_builders/status_command_builder'
10
11
  require_relative 'filter_builders/single_filter_builder'
@@ -121,6 +122,7 @@ module Gitlab
121
122
  [
122
123
  actions[:comment],
123
124
  CommandBuilders::LabelCommandBuilder.new(actions[:labels]).build_command,
125
+ CommandBuilders::RemoveLabelCommandBuilder.new(actions[:remove_labels]).build_command,
124
126
  CommandBuilders::CcCommandBuilder.new(actions[:mention]).build_command,
125
127
  CommandBuilders::StatusCommandBuilder.new(actions[:status]).build_command
126
128
  ]
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module Triage
3
- VERSION = '0.2.1'.freeze
3
+ VERSION = '0.3.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-triage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-29 00:00:00.000000000 Z
11
+ date: 2017-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -121,6 +121,7 @@ files:
121
121
  - lib/gitlab/triage/command_builders/cc_command_builder.rb
122
122
  - lib/gitlab/triage/command_builders/comment_command_builder.rb
123
123
  - lib/gitlab/triage/command_builders/label_command_builder.rb
124
+ - lib/gitlab/triage/command_builders/remove_label_command_builder.rb
124
125
  - lib/gitlab/triage/command_builders/status_command_builder.rb
125
126
  - lib/gitlab/triage/engine.rb
126
127
  - lib/gitlab/triage/filter_builders/base_filter_builder.rb