hachi 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hachi/clients/alert.rb +1 -1
- data/lib/hachi/clients/base.rb +1 -1
- data/lib/hachi/version.rb +1 -1
- data/samples/04_merge_alerts.rb +17 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e065fd460cb9324e124aef7c1f779c2c4d2eb4368248be8b64de1ccff687dc99
|
4
|
+
data.tar.gz: ee69559c7d0d3d2e494bf8fc64fc743b60404f15701f8ad2acfec1fb7d629e9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efd71a3a72134fd70f2caf17b6e835212972640b7535b294c26224ce944ac77e5d7866889b78b3836449cbd04b6169203af76da167443524ca4dd4397974fce7
|
7
|
+
data.tar.gz: 0b052f52652fb095bd1786c2394439f774e876d48175628a1e701a32debe487b65ece8881d24cdea3b00231d811ef8b80817507c12901dfe58c1dcb2df57e157
|
data/lib/hachi/clients/alert.rb
CHANGED
data/lib/hachi/clients/base.rb
CHANGED
data/lib/hachi/version.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift("#{__dir__}/../lib")
|
4
|
+
|
5
|
+
require "hachi"
|
6
|
+
|
7
|
+
def api
|
8
|
+
@api ||= Hachi::API.new
|
9
|
+
end
|
10
|
+
|
11
|
+
description = ARGV[0].to_s
|
12
|
+
case_id = ARGV[1].to_s
|
13
|
+
|
14
|
+
alerts = api.alert.search(description: description)
|
15
|
+
alert_ids = alerts.map { |alert| alert.dig "id" }
|
16
|
+
|
17
|
+
api.alert.merge_into_case(alert_ids, case_id)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hachi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- samples/01_create_an_alert.rb
|
128
128
|
- samples/02_search_artifacts.rb
|
129
129
|
- samples/03_list_cases.rb
|
130
|
+
- samples/04_merge_alerts.rb
|
130
131
|
homepage: https://github.com/ninoseki/hachi
|
131
132
|
licenses:
|
132
133
|
- MIT
|