gitlab-triage 1.0.0 → 1.0.1

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: '068290d03b6eb617a306b0a5ea4ce9b255fa266a66cf97b7af06dca8395aae0a'
4
- data.tar.gz: d73a8294b27be8fcec3fc465be95cf41109b8762abb1578a8c6b60da6d29c5ac
3
+ metadata.gz: 3d45f0fbf1ce85085bd2a3af548709af191fd4dcf628760a95e5d5f73d12cecc
4
+ data.tar.gz: bbef68f8e227f08dda34c5983b5ccdbb2a4cfb81b1aa29e3aeb9b82f572d0070
5
5
  SHA512:
6
- metadata.gz: 24127793df3fcb08fe6ed9434ea4f0005617fb1e507df0a7e14bc065eb18bcd7a36bbf7d91501bf442484d21ea0dc1b4b02ad45dd625e6ca37c3fab234b8aec4
7
- data.tar.gz: 1271a01b3bf03430265b068f98b9df87a53b8ca2026a71874fb64c5d1ceba3a950c6910a89045440f8e55eef0d64d46283a33e3459aeb1ddee337321e219fca8
6
+ metadata.gz: 2100782933cf6b678b146d0f51b93222956c0d5dbe7b6cc51426e591b0a0556422f0e0dcefd26829515cc5d46d24a984017a33eaf38e2554bceaf7d200219fc7
7
+ data.tar.gz: 14e182129b3d94af9f4374e6a251a7f47c4b9b85ed83a22ad029b0853cc19db5ec76c29e32f6eddd53ce27d285ad917fdd3887bf2eadf7be036adeb54ba7029e
data/README.md CHANGED
@@ -591,6 +591,32 @@ actions:
591
591
  {{author}} Are you still interested in finishing this merge request?
592
592
  ```
593
593
 
594
+ ###### Harnessing Quick Actions
595
+
596
+ [GitLab's quick actions feature](https://docs.gitlab.com/ce/user/project/quick_actions.html) is available in Core.
597
+ All of the operations supported by executing a quick action can be carried out via the comment action.
598
+
599
+ If GitLab triage does not support an operation natively, it may be possible via a quick action in a comment.
600
+
601
+ For example:
602
+ - Flagging an issue as [confidential](https://docs.gitlab.com/ce/user/project/issues/confidential_issues.html)
603
+ - [Locking issue discussion](https://docs.gitlab.com/ce/user/discussions/#lock-discussions)
604
+
605
+ ```yml
606
+ resource_rules:
607
+ issues:
608
+ rules:
609
+ - name: Mark bugs as confidential
610
+ conditions:
611
+ state: opened
612
+ ruby: !resource[:confidential]
613
+ labels:
614
+ - bug
615
+ actions:
616
+ comment: |
617
+ /confidential
618
+ ```
619
+
594
620
  ###### Ruby expression
595
621
 
596
622
  The comment can also contain Ruby expression, using Ruby's own string
@@ -35,6 +35,8 @@ module Gitlab
35
35
  end
36
36
 
37
37
  def label
38
+ return unless resource[:label]
39
+
38
40
  @label ||= Label.new(
39
41
  resource[:label].reverse_merge(added_at: resource[:created_at]),
40
42
  parent: self)
@@ -25,8 +25,9 @@ module Gitlab
25
25
  # Make this an alias of `labels` when we have:
26
26
  # https://gitlab.com/gitlab-org/gitlab-ce/issues/51011
27
27
  def labels_with_details
28
+ # Labels can be deleted thus event.label can be nil
28
29
  @labels_with_details ||= label_events
29
- .select { |event| event.action == 'add' }
30
+ .select { |event| event.action == 'add' && event.label }
30
31
  .map(&:label)
31
32
  .uniq(&:name)
32
33
  .select { |label| resource[:labels].include?(label.name) }
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module Triage
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.0.1'.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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-19 00:00:00.000000000 Z
11
+ date: 2019-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport