ruboty-reviewer_assign 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 316b9d23b2bd382a2e606b19eef6018dced2c53b2e9de692093c212c4654ca00
4
+ data.tar.gz: 3c3d48aafbdb4ebc14e4b26e78febdf5067fe9a0a6ec579568021a303e49098f
5
+ SHA512:
6
+ metadata.gz: cbef8c025a5a609e46086352c21080ff940c9f30b16bbdb6f02ffb2e3c6126826844dd14290013e085ed6cb2fc222a752a0e8da97aaf01b880515be6447e27ef
7
+ data.tar.gz: 0b86c7124e0072d5d3e03ec0cabbbe901516695b762c8ce92e86d4936128f53dfe37be385b0bc6bf0240309f59df20c87550e2774428eb90dbcf08bc8ad3fb85
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.5.1
5
+ before_install: gem install bundler -v 1.16.2
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at konpeiex@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in ruboty-reviewer_assign.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 motsat
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/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # Ruboty::ReviewerAssign
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ruboty/reviewer_assign`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'ruboty-reviewer_assign'
13
+ ```
14
+
15
+ ## ENV
16
+ ```
17
+ GITHUB_REPOSITORY="xxxx/xxxx" # ex. motsat/hoge_review_repo
18
+ OCTOKIT_ACCESS_TOKEN="xxxxxx"
19
+ SLACK_TOKEN="xxx"
20
+ REDIS_URL="redis://xxx.xxx.x.x:6379"
21
+ ```
22
+
23
+ ## How Get Token(Draft)
24
+ Slack Global Menu
25
+ Slackをカスタマイズ(Customize Slack)
26
+ App管理
27
+
28
+ カスタムインテグレーション
29
+ Bots
30
+ 追加
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "ruboty/reviewer_assign"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
File without changes
@@ -0,0 +1,41 @@
1
+ require "ruboty/reviewer_assign/actions/add"
2
+ require "ruboty/reviewer_assign/actions/del"
3
+ require "ruboty/reviewer_assign/actions/tagging"
4
+ require "ruboty/reviewer_assign/actions/assign"
5
+ require "ruboty/reviewer_assign/actions/members"
6
+
7
+ module Ruboty
8
+ module Handlers
9
+ # An Ruboty Handler + Actions to hoge-hige
10
+ class ReviewerAssign < Base
11
+ on(/assign /i, name: "assign", description: "プルリクのレビューをアサインする 例) assign (tag) https://github.com/motsat/reviewer_support_bot/pull/4")
12
+ on(/add /i, name: "add", description: "レビュアーを登録する 例) add @slack_account github_account")
13
+ on(/del /i, name: "del", description: "レビュアーを削除する 例) del @slack_account")
14
+ on(/members\z/i, name: "members", description: "レビュアー一覧 例) members")
15
+ on(/tagging /i, name: "tagging", description: "レビュアーにタグを設定 例) tagging @slack_account tag1 tag2")
16
+
17
+ # env :DEFAULT_HOGE_TEXT1, "DEFAULT_HOGE_TEXT1 desc"
18
+ # env :DEFAULT_HOGE_TEXT2, "DEFAULT_HOGE_TEXT2 desc"
19
+
20
+ def assign(message)
21
+ Ruboty::ReviewerAssign::Actions::Assign.new(message).call
22
+ end
23
+
24
+ def add(message)
25
+ Ruboty::ReviewerAssign::Actions::Add.new(message).call
26
+ end
27
+
28
+ def del(message)
29
+ Ruboty::ReviewerAssign::Actions::Del.new(message).call
30
+ end
31
+
32
+ def members(message)
33
+ Ruboty::ReviewerAssign::Actions::Members.new(message).call
34
+ end
35
+
36
+ def tagging(message)
37
+ Ruboty::ReviewerAssign::Actions::Tagging.new(message).call
38
+ end
39
+ end
40
+ end
41
+ end
File without changes
@@ -0,0 +1,28 @@
1
+ require 'ruboty/reviewer_assign/parsers/add'
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ module Actions
6
+ class Add < Ruboty::Actions::Base
7
+ def call
8
+ message.reply(add)
9
+ rescue Ruboty::ReviewerAssign::Parsers::Base::ParseError => e
10
+ message.reply(e.message)
11
+ end
12
+
13
+ private
14
+ def add
15
+ slack_member_id, github_account = Ruboty::ReviewerAssign::Parsers::Add.new(message).parse
16
+ reviewer = Reviewer.find_by_slack_member_id(slack_member_id)
17
+ if reviewer
18
+ "<@#{message.original[:user]["id"]}> <@#{slack_member_id}> そのSlackアカウントは登録済です:innocent:"
19
+ else
20
+ Reviewer.add(slack_member_id: slack_member_id, github_account: github_account)
21
+ "<@#{message.original[:user]["id"]}> <@#{slack_member_id}> レビュアーを追加しました:muscle:"
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+
@@ -0,0 +1,39 @@
1
+ require 'ruboty/reviewer_assign/parsers/assign'
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ module Actions
6
+ class Assign < Ruboty::Actions::Base
7
+ def call
8
+ message.reply(assign)
9
+ rescue Ruboty::ReviewerAssign::Parsers::Base::ParseError => e
10
+ message.reply(e.message)
11
+ end
12
+
13
+ private
14
+ def assign
15
+ tag, pull_request_url = Ruboty::ReviewerAssign::Parsers::Assign.new(message).parse
16
+
17
+ reviewers = tag ? Reviewer.by_tag(tag) : Reviewer.all
18
+
19
+ # reject self
20
+ reviewers.reject! {|r| r.slack_member_id == message.original[:user]["id"] }
21
+
22
+ return "<@#{message.original[:user]["id"]}> レビュアーが見つかりません:tired_face:" if reviewers.size == 0
23
+ reviewer = reviewers.sort(&:last_reviewed_at).first
24
+ github_api.assign_reviewer(pull_request_url, [reviewer.github_account])
25
+ to = reviewers.map { |l| "<@#{l.slack_member_id}>" }.join " "
26
+ reviewers.each do |l|
27
+ l.last_reviewed_at = Time.now
28
+ l.save!
29
+ end
30
+ "レビューお願いします:pray: #{pull_request_url}\n#{to}"
31
+ end
32
+
33
+ def github_api
34
+ GithubAPI.new
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,27 @@
1
+ require 'ruboty/reviewer_assign/parsers/del'
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ module Actions
6
+ class Del < Ruboty::Actions::Base
7
+ def call
8
+ message.reply(del)
9
+ rescue Ruboty::ReviewerAssign::Parsers::Base::ParseError => e
10
+ message.reply(e.message)
11
+ end
12
+
13
+ private
14
+ def del
15
+ slack_member_id = Ruboty::ReviewerAssign::Parsers::Del.new(message).parse
16
+ reviewer = Reviewer.find_by_slack_member_id(slack_member_id)
17
+ if reviewer
18
+ Reviewer.delete(slack_member_id: slack_member_id)
19
+ "<@#{message.original[:user]["id"]}> レビュアーを削除しました:skull:"
20
+ else
21
+ "<@#{message.original[:user]["id"]}> レビュアーが見つかりません:tired_face:"
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,25 @@
1
+ module Ruboty
2
+ module ReviewerAssign
3
+ module Actions
4
+ class Members < Ruboty::Actions::Base
5
+ def call
6
+ message.reply(members)
7
+ rescue Ruboty::ReviewerAssign::Parsers::Base::ParseError => e
8
+ message.reply(e.message)
9
+ end
10
+
11
+ private
12
+ def members
13
+ summarys =
14
+ Reviewer.all.map do |reviewer|
15
+ slack_api = SlackAPI.new
16
+ member = slack_api.find_member_by_id(reviewer.slack_member_id)
17
+ "@#{member["name"]}\n github: #{reviewer.github_account}\n tags: #{reviewer.tags.join "/"}\n last_reviewed_at: #{reviewer.last_reviewed_at}"
18
+ end
19
+ "登録済のレビュアー:family:↓↓\n\n" + summarys.join("\n\n")
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+
@@ -0,0 +1,31 @@
1
+ require 'ruboty/reviewer_assign/parsers/tagging'
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ module Actions
6
+ class Tagging < Ruboty::Actions::Base
7
+ def call
8
+ message.reply(tagging)
9
+ rescue Ruboty::ReviewerAssign::Parsers::Base::ParseError => e
10
+ message.reply(e.message)
11
+ end
12
+
13
+ private
14
+ def tagging
15
+ slack_member_id, tags = Ruboty::ReviewerAssign::Parsers::Tagging.new(message).parse
16
+ reviewer = Reviewer.find_by_slack_member_id(slack_member_id)
17
+ unless reviewer
18
+ return "<@#{slack_member_id}> レビュアーが見つかりません:tired_face:"
19
+ end
20
+ reviewer.tags = tags
21
+ reviewer.save!
22
+ "<@#{slack_member_id}> タグを変更しました:muscle:"
23
+ end
24
+
25
+ def slack_api
26
+ SlackAPI.new
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,21 @@
1
+ module Ruboty
2
+ module ReviewerAssign
3
+ class GithubAPI
4
+ def assign_reviewer(pull_request_url, reviewer_accounts)
5
+ id = pull_request_id_by_url(pull_request_url)
6
+ octokit.request_pull_request_review(ENV["GITHUB_REPOSITORY"], id, reviewers: reviewer_accounts)
7
+ end
8
+
9
+ private
10
+ def pull_request_id_by_url(pull_request_url)
11
+ pull_request_url.split("/").last
12
+ end
13
+
14
+ def octokit
15
+ # https://github.com/octokit/octokit.rb
16
+ # Given $OCTOKIT_API_ENDPOINT
17
+ @octokit ||= Octokit::Client.new(access_token: ENV["OCTOKIT_ACCESS_TOKEN"])
18
+ end
19
+ end
20
+ end
21
+ end
File without changes
@@ -0,0 +1,19 @@
1
+ require 'ruboty/reviewer_assign/parsers/base'
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ module Parsers
6
+ class Add < Ruboty::ReviewerAssign::Parsers::Base
7
+ def parse
8
+ vars = message.body.squish.split " "
9
+ # [0]はbot自身、[1]は対象ユーザー
10
+ raise ParseError.new 'invalid vars size' unless vars.size == 4
11
+ raise ParseError.new "invalid slack account : #{vars[2]}" unless message.original[:mention_to][1]
12
+ slack_member_id = message.original[:mention_to][1]["id"]
13
+ github_account = vars[3]
14
+ [slack_member_id, github_account]
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,28 @@
1
+ require 'ruboty/reviewer_assign/parsers/base'
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ module Parsers
6
+ class Assign < Ruboty::ReviewerAssign::Parsers::Base
7
+ def parse
8
+ vars = message.body.squish.split " "
9
+ # [0]はbot自身、[1]は対象ユーザー
10
+ unless vars.size == 4 || vars.size == 3
11
+ raise ParseError.new 'invalid vars size'
12
+ end
13
+
14
+ group, pull_request_url =
15
+ case vars.size
16
+ when 3
17
+ return [nil, vars[2]]
18
+ when 4
19
+ return [vars[2], vars[3]]
20
+ else
21
+ raise
22
+ end
23
+ [group, pull_request_url]
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,22 @@
1
+ require 'active_support/core_ext/string/filters'
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ module Parsers
6
+ class Base
7
+ class ParseError < StandardError; end
8
+ attr_reader :message
9
+ def initialize(message)
10
+ @message = message
11
+ end
12
+ def parse
13
+ raise "abstruct method"
14
+ end
15
+
16
+ def raise_parse_error(message)
17
+ raise ParseError.new message
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,16 @@
1
+ require 'ruboty/reviewer_assign/parsers/base'
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ module Parsers
6
+ class Del < Ruboty::ReviewerAssign::Parsers::Base
7
+ def parse
8
+ vars = message.body.squish.split " "
9
+ raise ParseError.new 'invalid vars size' unless vars.size == 3
10
+ raise ParseError.new "invalid slack account : #{vars[2]}" unless message.original[:mention_to][1]
11
+ message.original[:mention_to][1]["id"]
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ require 'ruboty/reviewer_assign/parsers/base'
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ module Parsers
6
+ class Tagging < Ruboty::ReviewerAssign::Parsers::Base
7
+ def parse
8
+ vars = message.body.squish.split " "
9
+ raise ParseError.new 'invalid vars size' unless vars.size > 1
10
+ raise ParseError.new "invalid slack account : #{vars[2]}" unless message.original[:mention_to][1]
11
+ slack_member_id = message.original[:mention_to][1]["id"]
12
+ [slack_member_id, vars[3..-1]] # 1.slack_realname or email, 2.tags
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,67 @@
1
+ require "redis-objects"
2
+
3
+ module Ruboty
4
+ module ReviewerAssign
5
+ class Reviewer
6
+ include Redis::Objects
7
+ list :lists, global: true, marshal: true
8
+ attr_reader :slack_member_id
9
+ attr_accessor :github_account, :tags, :last_reviewed_at
10
+
11
+ def self.find_by_slack_member_id(slack_member_id)
12
+ vars = lists.find { |reviewer| reviewer[:slack_member_id] == slack_member_id }
13
+ vars ? Reviewer.new(vars) : nil
14
+ end
15
+
16
+ def self.add(slack_member_id:, github_account:)
17
+ # TODO lock and unique check
18
+ vars = { slack_member_id: slack_member_id, github_account: github_account, last_reviewed_at: Time.now, tags: []}
19
+ lists << vars
20
+ Reviewer.new(vars)
21
+ end
22
+
23
+ def self.delete(slack_member_id:)
24
+ # TODO find_by_realname_or_emailだとnewするので奇妙な感じになってる
25
+ vars = lists.find { |reviewer| reviewer[:slack_member_id] == slack_member_id }
26
+ lists.delete vars if vars
27
+ end
28
+
29
+ def self.by_tag(tag)
30
+ all.select { |reviwer| reviwer.has_tag? tag }
31
+ end
32
+
33
+ def self.all
34
+ lists.map do |l|
35
+ Reviewer.new(slack_member_id: l[:slack_member_id],
36
+ github_account: l[:github_account],
37
+ last_reviewed_at: l[:last_reviewed_at],
38
+ tags: l[:tags])
39
+ end
40
+ end
41
+
42
+ def has_tag?(tag)
43
+ tags.include? tag
44
+ end
45
+
46
+ def save!
47
+ update_attributes( github_account: github_account, last_reviewed_at: last_reviewed_at, tags: tags)
48
+ end
49
+
50
+ private
51
+
52
+ def update_attributes(values)
53
+ index = lists.to_a.index { |l| l[:slack_member_id] == slack_member_id }
54
+ lists[index] = lists[index].merge values
55
+ end
56
+
57
+
58
+ def initialize(slack_member_id:, github_account:,
59
+ tags:, last_reviewed_at:)
60
+ @slack_member_id = slack_member_id
61
+ @github_account = github_account
62
+ @tags = tags
63
+ @last_reviewed_at = last_reviewed_at
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,31 @@
1
+ module Ruboty
2
+ module ReviewerAssign
3
+ class SlackAPI
4
+
5
+ def client
6
+ @client ||= Slack::Client.new(token: ENV['SLACK_TOKEN'])
7
+ end
8
+
9
+ def users_list
10
+ @users_list ||= client.users_list
11
+ end
12
+
13
+ def reset_users_list
14
+ @users_list = nil
15
+ end
16
+
17
+ def find_member_by_id(slack_member_id)
18
+ users_list["members"].find do |member|
19
+ member["id"] == slack_member_id
20
+ end
21
+ end
22
+
23
+ def find_member_by_name(realname_or_email)
24
+ users_list["members"].find do |member|
25
+ member_realname_or_emails = [member["name"]] # realname..?
26
+ member_realname_or_emails.include? realname_or_email
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,5 @@
1
+ module Ruboty
2
+ module ReviewerAssign
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ require "ruboty/reviewer_assign/version"
2
+ require "ruboty/handlers/reviewer_assign"
3
+ require "ruboty/reviewer_assign/slack_api"
4
+ require "ruboty/reviewer_assign/github_api"
5
+ require "ruboty/reviewer_assign/reviewer"
6
+ require "octokit"
7
+ require "ruboty/slack_rtm"
@@ -0,0 +1,32 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "ruboty/reviewer_assign/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ruboty-reviewer_assign"
8
+ spec.version = Ruboty::ReviewerAssign::VERSION
9
+ spec.authors = ["motsat"]
10
+ spec.email = ["konpeiex@gmail.com"]
11
+
12
+ spec.summary = %q{ruboty + slackでレビュアーアサイン}
13
+ spec.description = %q{ruboty + slackでレビュアーアサイン}
14
+ spec.homepage = "https://github.com/motsat/ruboty-reviewer_assign"
15
+ spec.license = "MIT"
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 = "exe"
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ["lib"]
25
+
26
+ spec.add_development_dependency 'pry'
27
+ spec.add_development_dependency 'dotenv'
28
+ spec.add_dependency "ruboty-slack_rtm"
29
+ spec.add_dependency "octokit"
30
+ spec.add_dependency "activesupport"
31
+ spec.add_dependency "redis-objects"
32
+ end
metadata ADDED
@@ -0,0 +1,157 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruboty-reviewer_assign
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - motsat
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-09-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
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: dotenv
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
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: ruboty-slack_rtm
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: octokit
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: activesupport
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
+ - !ruby/object:Gem::Dependency
84
+ name: redis-objects
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: ruboty + slackでレビュアーアサイン
98
+ email:
99
+ - konpeiex@gmail.com
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".travis.yml"
106
+ - CODE_OF_CONDUCT.md
107
+ - Gemfile
108
+ - LICENSE.txt
109
+ - README.md
110
+ - Rakefile
111
+ - bin/console
112
+ - bin/setup
113
+ - lib/ruboty/handlers/.keep
114
+ - lib/ruboty/handlers/reviewer_assign.rb
115
+ - lib/ruboty/reviewer_assign.rb
116
+ - lib/ruboty/reviewer_assign/actions/.keep
117
+ - lib/ruboty/reviewer_assign/actions/add.rb
118
+ - lib/ruboty/reviewer_assign/actions/assign.rb
119
+ - lib/ruboty/reviewer_assign/actions/del.rb
120
+ - lib/ruboty/reviewer_assign/actions/members.rb
121
+ - lib/ruboty/reviewer_assign/actions/tagging.rb
122
+ - lib/ruboty/reviewer_assign/github_api.rb
123
+ - lib/ruboty/reviewer_assign/parsers/.keep
124
+ - lib/ruboty/reviewer_assign/parsers/add.rb
125
+ - lib/ruboty/reviewer_assign/parsers/assign.rb
126
+ - lib/ruboty/reviewer_assign/parsers/base.rb
127
+ - lib/ruboty/reviewer_assign/parsers/del.rb
128
+ - lib/ruboty/reviewer_assign/parsers/tagging.rb
129
+ - lib/ruboty/reviewer_assign/reviewer.rb
130
+ - lib/ruboty/reviewer_assign/slack_api.rb
131
+ - lib/ruboty/reviewer_assign/version.rb
132
+ - ruboty-reviewer_assign.gemspec
133
+ homepage: https://github.com/motsat/ruboty-reviewer_assign
134
+ licenses:
135
+ - MIT
136
+ metadata: {}
137
+ post_install_message:
138
+ rdoc_options: []
139
+ require_paths:
140
+ - lib
141
+ required_ruby_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ required_rubygems_version: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
151
+ requirements: []
152
+ rubyforge_project:
153
+ rubygems_version: 2.7.6
154
+ signing_key:
155
+ specification_version: 4
156
+ summary: ruboty + slackでレビュアーアサイン
157
+ test_files: []