talentio-notifier 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/Dockerfile +6 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +82 -0
- data/LICENSE.txt +21 -0
- data/Makefile +8 -0
- data/README.md +50 -0
- data/Rakefile +6 -0
- data/bin/talentio-notifier +6 -0
- data/lib/talentio.rb +43 -0
- data/lib/talentio/cli.rb +22 -0
- data/lib/talentio/client.rb +24 -0
- data/lib/talentio/notifier/slack.rb +60 -0
- data/lib/talentio/notifier/slack/interview.rb +65 -0
- data/lib/talentio/notifier/slack/selection_result.rb +112 -0
- data/lib/talentio/notifier/version.rb +5 -0
- data/manifests/cron.yml +69 -0
- data/talentio-notifier.gemspec +30 -0
- metadata +134 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df54217a77db2ecd1a6f947a2a3de15f26a70db283d69d1194c644ffbc4c82c7
|
4
|
+
data.tar.gz: a353b6d1a5c6ac07cceebea855212a40bad188502fbfdbdf998723bb0cf643c4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cfff5175d7ae302a191d10efc1bcb8fa6cd49179f62d4e427506c4e0b0dddd6845647f33be40647d9856ba104f40a6b0464b110e8fdb472833402176cc17b783
|
7
|
+
data.tar.gz: 43acca98a0e68f0a09efe0cf3953bca2b12e45559126d5d27c0681b824a762c24fb54732b7694b3e5217b0228231d04d365a64e5591550fbd0119aae89ec2415
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Dockerfile
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
talentio-notifier (0.1.0)
|
5
|
+
faraday
|
6
|
+
holiday_jp
|
7
|
+
slack-api
|
8
|
+
slack-ruby-client
|
9
|
+
thor
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
activesupport (6.0.3.2)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
i18n (>= 0.7, < 2)
|
17
|
+
minitest (~> 5.1)
|
18
|
+
tzinfo (~> 1.1)
|
19
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
20
|
+
concurrent-ruby (1.1.6)
|
21
|
+
diff-lcs (1.4.4)
|
22
|
+
eventmachine (1.2.7)
|
23
|
+
faraday (0.17.3)
|
24
|
+
multipart-post (>= 1.2, < 3)
|
25
|
+
faraday_middleware (0.10.1)
|
26
|
+
faraday (>= 0.7.4, < 1.0)
|
27
|
+
faye-websocket (0.10.9)
|
28
|
+
eventmachine (>= 0.12.0)
|
29
|
+
websocket-driver (>= 0.5.1)
|
30
|
+
gli (2.19.2)
|
31
|
+
hashie (4.1.0)
|
32
|
+
holiday_jp (0.7.1)
|
33
|
+
i18n (1.8.4)
|
34
|
+
concurrent-ruby (~> 1.0)
|
35
|
+
minitest (5.14.1)
|
36
|
+
multi_json (1.15.0)
|
37
|
+
multipart-post (2.1.1)
|
38
|
+
rake (12.3.3)
|
39
|
+
rspec (3.9.0)
|
40
|
+
rspec-core (~> 3.9.0)
|
41
|
+
rspec-expectations (~> 3.9.0)
|
42
|
+
rspec-mocks (~> 3.9.0)
|
43
|
+
rspec-core (3.9.2)
|
44
|
+
rspec-support (~> 3.9.3)
|
45
|
+
rspec-expectations (3.9.2)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.9.0)
|
48
|
+
rspec-mocks (3.9.1)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.9.0)
|
51
|
+
rspec-support (3.9.3)
|
52
|
+
slack-api (1.6.1)
|
53
|
+
faraday (~> 0.11)
|
54
|
+
faraday_middleware (~> 0.10.0)
|
55
|
+
faye-websocket (~> 0.10.6)
|
56
|
+
multi_json (~> 1.0, >= 1.0.3)
|
57
|
+
slack-ruby-client (0.14.6)
|
58
|
+
activesupport
|
59
|
+
faraday (>= 0.9)
|
60
|
+
faraday_middleware
|
61
|
+
gli
|
62
|
+
hashie
|
63
|
+
websocket-driver
|
64
|
+
thor (1.0.1)
|
65
|
+
thread_safe (0.3.6)
|
66
|
+
tzinfo (1.2.7)
|
67
|
+
thread_safe (~> 0.1)
|
68
|
+
websocket-driver (0.7.3)
|
69
|
+
websocket-extensions (>= 0.1.0)
|
70
|
+
websocket-extensions (0.1.5)
|
71
|
+
zeitwerk (2.4.0)
|
72
|
+
|
73
|
+
PLATFORMS
|
74
|
+
ruby
|
75
|
+
|
76
|
+
DEPENDENCIES
|
77
|
+
rake (~> 12.0)
|
78
|
+
rspec (~> 3.0)
|
79
|
+
talentio-notifier!
|
80
|
+
|
81
|
+
BUNDLED WITH
|
82
|
+
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 pyama86
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/Makefile
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
VERSION=0.0.1
|
2
|
+
build:
|
3
|
+
docker build -t talentio-notifier .
|
4
|
+
|
5
|
+
push: build
|
6
|
+
docker tag talentio-notifier pyama/talentio-notifier:$(VERSION)
|
7
|
+
docker push pyama/talentio-notifier:$(VERSION)
|
8
|
+
sed -i 's/talentio-notifier:*/talentio-notifier:$(VERSION)/g' manifests/cron.yml
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Talentio::Notifier
|
2
|
+
|
3
|
+
TalentioのAPIを利用して、Slack通知を行うことができます。これにより採用選考をいい感じに進めていきましょう。
|
4
|
+
|
5
|
+
## 利用方法
|
6
|
+
|
7
|
+
### 書類選考や面接結果のリマインド
|
8
|
+
|
9
|
+
選考結果の記入が終わっていないユーザーに通知します。
|
10
|
+
|
11
|
+
```
|
12
|
+
$ talentio-notifier remind-result
|
13
|
+
```
|
14
|
+
|
15
|
+
### 面接時間のリマインド
|
16
|
+
|
17
|
+
面接の10分前にリマインドします。
|
18
|
+
|
19
|
+
```
|
20
|
+
$ talentio-notifier remind-interview
|
21
|
+
```
|
22
|
+
|
23
|
+
|
24
|
+
## 実行環境
|
25
|
+
|
26
|
+
開発者の所属する企業ではk8sを利用して運用しています。manifestsについても `manifests` 配下のものを利用可能です。
|
27
|
+
|
28
|
+
## 環境変数
|
29
|
+
|
30
|
+
APIキーなどは環境変数で指定してください。
|
31
|
+
|
32
|
+
- SLACK_APIKEY
|
33
|
+
slackのAPIキーを指定してください。
|
34
|
+
- TALENTIO_APIKEY
|
35
|
+
talentioのAPIキーを指定してください。
|
36
|
+
- TALENTIO_SKIP_STAGE
|
37
|
+
役員面接などはリマインドしたくないときに指定してください。デフォルト値は3で、開発者の所属する企業の場合は、4段階の先行があり、最終工程はリマインドしたくないため、3をデフォルトにしています。
|
38
|
+
- TALENTIO_REMIND_INTERVAL
|
39
|
+
インタビュー通知のcron間隔に合わせて秒で指定してください。デフォルトで600(10分)です。
|
40
|
+
- TELENTIO_SLACK_CHANNEL
|
41
|
+
トークで通知したことを通知するチャンネル指定です。デフォルトは `#recruiting` です。
|
42
|
+
|
43
|
+
## Contributing
|
44
|
+
|
45
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/talentio-notifier.
|
46
|
+
|
47
|
+
|
48
|
+
## License
|
49
|
+
|
50
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/lib/talentio.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'talentio'
|
2
|
+
require 'talentio/client'
|
3
|
+
require 'talentio/notifier/slack'
|
4
|
+
require 'talentio/notifier/slack/interview'
|
5
|
+
require 'talentio/notifier/slack/selection_result'
|
6
|
+
require 'uri'
|
7
|
+
|
8
|
+
module Talentio
|
9
|
+
class << self
|
10
|
+
def candidates
|
11
|
+
result = client.candidates.map do |c|
|
12
|
+
# まだステージが割り当てられていない
|
13
|
+
next if c['stages'].empty?
|
14
|
+
# 役員面接とかスキップしたい場合
|
15
|
+
next if ENV['TALENTIO_SKIP_STAGE'] && c['stages'].size > ENV['TALENTIO_SKIP_STAGE'].to_i
|
16
|
+
|
17
|
+
candidate = client.candidates(c['id'])
|
18
|
+
|
19
|
+
s = candidate['stages'].last
|
20
|
+
|
21
|
+
{
|
22
|
+
time: c['registeredAt'],
|
23
|
+
id: c['id'],
|
24
|
+
step: s['step'],
|
25
|
+
type: s['type'],
|
26
|
+
evaluations: s['evaluations'],
|
27
|
+
scheduled_at: s['scheduledAt'],
|
28
|
+
requisition_name: c['requisition']['name'],
|
29
|
+
candidate_url: URI.join(url, "ats/candidate/#{c['id']}").to_s
|
30
|
+
}
|
31
|
+
end.flatten.compact
|
32
|
+
end
|
33
|
+
|
34
|
+
def url
|
35
|
+
ENV['TALENTIO_URL'] || "https://talentio.com"
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
def client
|
40
|
+
@client ||= Client.new
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/lib/talentio/cli.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'thor'
|
3
|
+
|
4
|
+
module Talentio
|
5
|
+
class CLI < Thor
|
6
|
+
desc 'remind-interview', 'remind inteview'
|
7
|
+
def remind_interview
|
8
|
+
interview = Notifier::Slack::Interview.new(Notifier::Slack.new)
|
9
|
+
Talentio.candidates.each do |c|
|
10
|
+
interview.notify(c)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
desc 'remind-result', 'remind selection result'
|
15
|
+
def remind_result
|
16
|
+
result = Notifier::Slack::SelectionResult.new(Notifier::Slack.new)
|
17
|
+
Talentio.candidates.each do |c|
|
18
|
+
result.notify(c)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'uri'
|
3
|
+
module Talentio
|
4
|
+
class Client
|
5
|
+
def candidates(id=nil)
|
6
|
+
res = client.get do |req|
|
7
|
+
if id
|
8
|
+
req.url "candidates/#{id}"
|
9
|
+
else
|
10
|
+
req.url 'candidates', { status: 'ongoing' }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
JSON.parse res.body
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
def client
|
18
|
+
@_client ||= ::Faraday.new(:url => URI.join(::Talentio.url, "/api/v1/").to_s) do |b|
|
19
|
+
b.headers['Authorization'] = "Bearer #{ENV['TALENTIO_APIKEY']}"
|
20
|
+
b.adapter Faraday.default_adapter
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'time'
|
2
|
+
require 'json'
|
3
|
+
require 'pp'
|
4
|
+
require 'slack'
|
5
|
+
require 'holiday_jp'
|
6
|
+
module Talentio
|
7
|
+
module Notifier
|
8
|
+
class Slack
|
9
|
+
delegate :chat_postMessage, to: :@client
|
10
|
+
def notify?
|
11
|
+
ENV['SLACK_APIKEY']
|
12
|
+
end
|
13
|
+
|
14
|
+
def nofity
|
15
|
+
return unless notify?
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
def mention_id_from_evaluations(evaluations)
|
20
|
+
members.map do |sm|
|
21
|
+
evaluations.select {|e| !e['finished']}.map do |m|
|
22
|
+
{ id: "@#{sm['id']}", name: sm['name'] } if sm['real_name'] =~ /#{m["employee"]['lastName']}/ && sm['real_name'] =~ /#{m["employee"]['firstName']}/
|
23
|
+
end
|
24
|
+
end.flatten.compact
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def members
|
29
|
+
unless @members
|
30
|
+
members = []
|
31
|
+
next_cursor = nil
|
32
|
+
loop do
|
33
|
+
slack_users = client.users_list({limit: 1000, cursor: next_cursor})
|
34
|
+
members << slack_users['members']
|
35
|
+
next_cursor = slack_users['response_metadata']['next_cursor']
|
36
|
+
break if next_cursor.empty?
|
37
|
+
end
|
38
|
+
@members = members.flatten
|
39
|
+
end
|
40
|
+
@members
|
41
|
+
end
|
42
|
+
|
43
|
+
def client
|
44
|
+
unless @client
|
45
|
+
::Slack.configure do |conf|
|
46
|
+
conf.token = ENV['SLACK_APIKEY']
|
47
|
+
end
|
48
|
+
@client = ::Slack::Web::Client.new
|
49
|
+
if ENV['TALENTIO_TEST']
|
50
|
+
@client.define_singleton_method(:chat_postMessage) do |m|
|
51
|
+
puts m
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
@client
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
module Talentio
|
2
|
+
module Notifier
|
3
|
+
class Slack
|
4
|
+
class Interview
|
5
|
+
attr_reader :client
|
6
|
+
def initialize(client)
|
7
|
+
@client = client
|
8
|
+
end
|
9
|
+
|
10
|
+
def notify(data)
|
11
|
+
return if data[:type].to_s != "interview"
|
12
|
+
# 面接が行われていないものはスキップする
|
13
|
+
return unless data[:scheduled_at]
|
14
|
+
|
15
|
+
base_time = DateTime.parse(data[:scheduled_at])
|
16
|
+
diff = base_time.to_i - DateTime.now.to_i
|
17
|
+
|
18
|
+
# 10分毎にcronで実行される想定
|
19
|
+
if (diff < (ENV['TALENTIO_REMIND_INTERVAL'] || 600) && diff >= 0)
|
20
|
+
slack_mentions = client.mention_id_from_evaluations(data[:evaluations])
|
21
|
+
slack_mentions.each do |m|
|
22
|
+
client.chat_postMessage(
|
23
|
+
channel: m[:id],
|
24
|
+
as_user: false,
|
25
|
+
text: "#{base_time.strftime("%Y/%m/%d %H:%M")}からの面接よろしくお願いします!!1",
|
26
|
+
attachments: [{
|
27
|
+
fields: [
|
28
|
+
{
|
29
|
+
title: '区分',
|
30
|
+
value: data[:requisition_name]
|
31
|
+
},
|
32
|
+
{
|
33
|
+
title: 'url',
|
34
|
+
value: data[:candidate_url]
|
35
|
+
}
|
36
|
+
],
|
37
|
+
color: 'warning'
|
38
|
+
}]
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
client.chat_postMessage(
|
43
|
+
channel: ENV['TELENTIO_SLACK_CHANNEL'] || '#recruiting',
|
44
|
+
as_user: false,
|
45
|
+
text: "#{base_time.strftime("%Y/%m/%d %H:%M")}からの面接のリマインドをしました",
|
46
|
+
attachments: [{
|
47
|
+
fields: [
|
48
|
+
{
|
49
|
+
title: 'インタビュアー',
|
50
|
+
value: slack_mentions.map {|m| "#{m[:name]}"}.join(',')
|
51
|
+
},
|
52
|
+
{
|
53
|
+
title: 'url',
|
54
|
+
value: data[:candidate_url]
|
55
|
+
}
|
56
|
+
],
|
57
|
+
color: 'warning'
|
58
|
+
}]
|
59
|
+
)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
module Talentio
|
2
|
+
module Notifier
|
3
|
+
class Slack
|
4
|
+
class SelectionResult
|
5
|
+
attr_reader :client
|
6
|
+
def initialize(client)
|
7
|
+
@client = client
|
8
|
+
end
|
9
|
+
|
10
|
+
def notify(data)
|
11
|
+
channel_message = []
|
12
|
+
param = selection_types[data[:type].to_sym]
|
13
|
+
|
14
|
+
return unless param
|
15
|
+
# 納期の計算対象となる日付が登録されていないものはスキップする
|
16
|
+
return unless data[param[:limit_key]]
|
17
|
+
|
18
|
+
# 登録当日はスキップする
|
19
|
+
base_time = DateTime.parse(data[param[:limit_key]])
|
20
|
+
return if base_time >= Date.today
|
21
|
+
|
22
|
+
slack_mentions = client.mention_id_from_evaluations(data[:evaluations])
|
23
|
+
slack_mentions.each do |m|
|
24
|
+
limit_day = base_time + param[:limit_day]
|
25
|
+
# 納期を設定する
|
26
|
+
loop do
|
27
|
+
break if ![0, 6].include?(limit_day.wday) && !HolidayJp.holiday?(limit_day)
|
28
|
+
limit_day = limit_day + 1
|
29
|
+
end
|
30
|
+
|
31
|
+
# 個別の通知はトークで実行するので、共有チャンネルに動いたことを通知する
|
32
|
+
channel_message << {
|
33
|
+
name: m[:name],
|
34
|
+
limit:limit_day,
|
35
|
+
url: data[:candidate_url]
|
36
|
+
}
|
37
|
+
|
38
|
+
client.chat_postMessage(
|
39
|
+
channel: m[:id],
|
40
|
+
as_user: false,
|
41
|
+
text: "#{param[:label]}をお願いします。すぐに対応できないときはtalentioの「採用チーム内のコミュニケーション」にいつまでにやるかを書いてください。",
|
42
|
+
attachments: [{
|
43
|
+
fields: [
|
44
|
+
{
|
45
|
+
title: '区分',
|
46
|
+
value: data[:requisition_name]
|
47
|
+
},
|
48
|
+
{
|
49
|
+
title: '登録日時',
|
50
|
+
value: base_time.strftime("%Y/%m/%d %H:%M:%S")
|
51
|
+
},
|
52
|
+
{
|
53
|
+
title: '納期',
|
54
|
+
value: limit_day.to_s
|
55
|
+
},
|
56
|
+
{
|
57
|
+
title: 'url',
|
58
|
+
value: data[:candidate_url]
|
59
|
+
}
|
60
|
+
],
|
61
|
+
color: 'warning'
|
62
|
+
}]
|
63
|
+
)
|
64
|
+
|
65
|
+
channel_message.sort_by! { |a| a[:limit] }.each_with_object({}) do |m,r|
|
66
|
+
r[m[:limit].strftime('%Y/%m/%d')] ||= []
|
67
|
+
r[m[:limit].strftime('%Y/%m/%d')] << {
|
68
|
+
name: m[:name],
|
69
|
+
url: m[:url]
|
70
|
+
}
|
71
|
+
end.map do |k,v|
|
72
|
+
f = v.map do |vv|
|
73
|
+
[
|
74
|
+
{
|
75
|
+
title: vv[:name],
|
76
|
+
value: vv[:url]
|
77
|
+
},
|
78
|
+
]
|
79
|
+
end
|
80
|
+
|
81
|
+
client.chat_postMessage(
|
82
|
+
channel: ENV['TELENTIO_SLACK_CHANNEL'] || '#recruiting',
|
83
|
+
as_user: false,
|
84
|
+
text: "納期:#{k}の#{param[:label]}のお願いを通知しました",
|
85
|
+
attachments: [{
|
86
|
+
fields: f.flatten,
|
87
|
+
color: 'warning'
|
88
|
+
}]
|
89
|
+
)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
private
|
95
|
+
def selection_types
|
96
|
+
{
|
97
|
+
resume: {
|
98
|
+
label: "書類選考",
|
99
|
+
limit_day: 4,
|
100
|
+
limit_key: :time
|
101
|
+
},
|
102
|
+
interview: {
|
103
|
+
label: "面接評定",
|
104
|
+
limit_day: 5,
|
105
|
+
limit_key: :scheduled_at
|
106
|
+
}
|
107
|
+
}
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
data/manifests/cron.yml
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
apiVersion: batch/v1beta1
|
2
|
+
kind: CronJob
|
3
|
+
metadata:
|
4
|
+
name: talentio-notifier-result
|
5
|
+
spec:
|
6
|
+
schedule: "0 11,15 * * 1-5"
|
7
|
+
jobTemplate:
|
8
|
+
spec:
|
9
|
+
template:
|
10
|
+
spec:
|
11
|
+
containers:
|
12
|
+
- name: talentio-notifier
|
13
|
+
image: pyama/talentio-notifier:0.0.1
|
14
|
+
env:
|
15
|
+
- name: LANG
|
16
|
+
value: C.UTF-8
|
17
|
+
- name: TALENTIO_APIKEY
|
18
|
+
valueFrom:
|
19
|
+
secretKeyRef:
|
20
|
+
name: talentio-notifier-secret
|
21
|
+
key: talentio-apikey
|
22
|
+
- name: LANG
|
23
|
+
value: C.UTF-8
|
24
|
+
- name: SLACK_APIKEY
|
25
|
+
valueFrom:
|
26
|
+
secretKeyRef:
|
27
|
+
name: talentio-notifier-secret
|
28
|
+
key: slack-apikey
|
29
|
+
args:
|
30
|
+
- "/bin/bash"
|
31
|
+
- "-c"
|
32
|
+
- "jpholidayp/jpholidayp || talentio-notifier remind-resullt"
|
33
|
+
restartPolicy: Never
|
34
|
+
---
|
35
|
+
apiVersion: batch/v1beta1
|
36
|
+
kind: CronJob
|
37
|
+
metadata:
|
38
|
+
name: talentio-notifier-interview
|
39
|
+
spec:
|
40
|
+
schedule: "*/10 * * * 1-5"
|
41
|
+
jobTemplate:
|
42
|
+
spec:
|
43
|
+
template:
|
44
|
+
spec:
|
45
|
+
containers:
|
46
|
+
- name: talentio-notifier
|
47
|
+
image: pyama/talentio-notifier:0.0.1
|
48
|
+
env:
|
49
|
+
- name: TALENTIO_SKIP_STAGE
|
50
|
+
value: 3
|
51
|
+
- name: LANG
|
52
|
+
value: C.UTF-8
|
53
|
+
- name: TALENTIO_APIKEY
|
54
|
+
valueFrom:
|
55
|
+
secretKeyRef:
|
56
|
+
name: talentio-notifier-secret
|
57
|
+
key: talentio-apikey
|
58
|
+
- name: LANG
|
59
|
+
value: C.UTF-8
|
60
|
+
- name: SLACK_APIKEY
|
61
|
+
valueFrom:
|
62
|
+
secretKeyRef:
|
63
|
+
name: talentio-notifier-secret
|
64
|
+
key: slack-apikey
|
65
|
+
args:
|
66
|
+
- "/bin/bash"
|
67
|
+
- "-c"
|
68
|
+
- "jpholidayp/jpholidayp || talentio-notifier remind-interview"
|
69
|
+
restartPolicy: Never
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require_relative 'lib/talentio/notifier/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "talentio-notifier"
|
5
|
+
spec.version = Talentio::Notifier::VERSION
|
6
|
+
spec.authors = ["pyama86"]
|
7
|
+
spec.email = ["pyama@pepabo.com"]
|
8
|
+
|
9
|
+
spec.summary = %q{nofity command for talentio.}
|
10
|
+
spec.description = %q{nofity command for talentio.}
|
11
|
+
spec.homepage = "https://github.com/pyama86/talentio-notifier"
|
12
|
+
spec.license = "MIT"
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
|
+
|
15
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = "bin"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
spec.add_dependency "thor"
|
26
|
+
spec.add_dependency "faraday"
|
27
|
+
spec.add_dependency 'slack-api'
|
28
|
+
spec.add_dependency 'slack-ruby-client'
|
29
|
+
spec.add_dependency "holiday_jp"
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: talentio-notifier
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- pyama86
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-07-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: slack-api
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: slack-ruby-client
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: holiday_jp
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: nofity command for talentio.
|
84
|
+
email:
|
85
|
+
- pyama@pepabo.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".travis.yml"
|
93
|
+
- Dockerfile
|
94
|
+
- Gemfile
|
95
|
+
- Gemfile.lock
|
96
|
+
- LICENSE.txt
|
97
|
+
- Makefile
|
98
|
+
- README.md
|
99
|
+
- Rakefile
|
100
|
+
- bin/talentio-notifier
|
101
|
+
- lib/talentio.rb
|
102
|
+
- lib/talentio/cli.rb
|
103
|
+
- lib/talentio/client.rb
|
104
|
+
- lib/talentio/notifier/slack.rb
|
105
|
+
- lib/talentio/notifier/slack/interview.rb
|
106
|
+
- lib/talentio/notifier/slack/selection_result.rb
|
107
|
+
- lib/talentio/notifier/version.rb
|
108
|
+
- manifests/cron.yml
|
109
|
+
- talentio-notifier.gemspec
|
110
|
+
homepage: https://github.com/pyama86/talentio-notifier
|
111
|
+
licenses:
|
112
|
+
- MIT
|
113
|
+
metadata:
|
114
|
+
homepage_uri: https://github.com/pyama86/talentio-notifier
|
115
|
+
post_install_message:
|
116
|
+
rdoc_options: []
|
117
|
+
require_paths:
|
118
|
+
- lib
|
119
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 2.3.0
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
requirements: []
|
130
|
+
rubygems_version: 3.0.6
|
131
|
+
signing_key:
|
132
|
+
specification_version: 4
|
133
|
+
summary: nofity command for talentio.
|
134
|
+
test_files: []
|