lita-github-web-hooks-core 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 +4 -4
- data/.travis.yml +3 -0
- data/LICENSE +202 -21
- data/{LICENSE.txt → NOTICE} +16 -3
- data/README.md +3 -1
- data/lib/lita-github-web-hooks-core.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core.rb +14 -1
- data/lib/lita/extensions/github_web_hooks_core/hook_receiver.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/commit_comment.rb +19 -6
- data/lib/lita/extensions/github_web_hooks_core/hooks/create.rb +14 -1
- data/lib/lita/extensions/github_web_hooks_core/hooks/delete.rb +14 -1
- data/lib/lita/extensions/github_web_hooks_core/hooks/deployment.rb +20 -7
- data/lib/lita/extensions/github_web_hooks_core/hooks/deployment_status.rb +22 -9
- data/lib/lita/extensions/github_web_hooks_core/hooks/download.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/follow.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/fork.rb +15 -2
- data/lib/lita/extensions/github_web_hooks_core/hooks/fork_apply.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/gist.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/gollum.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/hook.rb +16 -3
- data/lib/lita/extensions/github_web_hooks_core/hooks/issue_comment.rb +20 -7
- data/lib/lita/extensions/github_web_hooks_core/hooks/issues.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/member.rb +14 -1
- data/lib/lita/extensions/github_web_hooks_core/hooks/membership.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/page_build.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/ping.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/public.rb +14 -1
- data/lib/lita/extensions/github_web_hooks_core/hooks/pull_request.rb +30 -17
- data/lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb +24 -11
- data/lib/lita/extensions/github_web_hooks_core/hooks/push.rb +18 -5
- data/lib/lita/extensions/github_web_hooks_core/hooks/release.rb +14 -1
- data/lib/lita/extensions/github_web_hooks_core/hooks/repo_hooks.rb +18 -5
- data/lib/lita/extensions/github_web_hooks_core/hooks/repository.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/status.rb +17 -4
- data/lib/lita/extensions/github_web_hooks_core/hooks/team_add.rb +13 -0
- data/lib/lita/extensions/github_web_hooks_core/hooks/watch.rb +16 -3
- data/lib/lita/github/web/hooks/core.rb +13 -0
- data/lib/lita/github/web/hooks/core/version.rb +14 -1
- data/lita-github-web-hooks-core.gemspec +1 -1
- metadata +3 -4
- data/lib/lita/extensions/github_web_hooks_core/listeners.rb +0 -22
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -6,27 +19,27 @@ module Lita::Extensions
|
|
6
19
|
def sha
|
7
20
|
deploy["sha"]
|
8
21
|
end
|
9
|
-
|
22
|
+
|
10
23
|
def environment
|
11
24
|
deploy["environment"]
|
12
25
|
end
|
13
|
-
|
26
|
+
|
14
27
|
def start_time
|
15
28
|
deploy["created_at"]
|
16
29
|
end
|
17
|
-
|
30
|
+
|
18
31
|
def deploy
|
19
32
|
payload["deployment"]
|
20
33
|
end
|
21
|
-
|
34
|
+
|
22
35
|
def deployer
|
23
36
|
payload["sender"]["login"]
|
24
37
|
end
|
25
|
-
|
38
|
+
|
26
39
|
def ref
|
27
40
|
deploy["ref"]
|
28
41
|
end
|
29
|
-
|
42
|
+
|
30
43
|
def attributes
|
31
44
|
{
|
32
45
|
sha: sha,
|
@@ -37,7 +50,7 @@ module Lita::Extensions
|
|
37
50
|
deploy: deploy,
|
38
51
|
deployer: deployer
|
39
52
|
}
|
40
|
-
end
|
53
|
+
end
|
41
54
|
end
|
42
55
|
end
|
43
56
|
end
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -6,35 +19,35 @@ module Lita::Extensions
|
|
6
19
|
def status
|
7
20
|
payload["deployment_status"]["state"]
|
8
21
|
end
|
9
|
-
|
22
|
+
|
10
23
|
def deployment_description
|
11
24
|
[deploy["description"], status].join(": ")
|
12
25
|
end
|
13
|
-
|
26
|
+
|
14
27
|
def sha
|
15
28
|
deploy["sha"]
|
16
29
|
end
|
17
|
-
|
30
|
+
|
18
31
|
def environment
|
19
32
|
deploy["environment"]
|
20
33
|
end
|
21
|
-
|
34
|
+
|
22
35
|
def start_time
|
23
36
|
deploy["created_at"]
|
24
37
|
end
|
25
|
-
|
38
|
+
|
26
39
|
def deploy
|
27
40
|
payload["deployment"]
|
28
41
|
end
|
29
|
-
|
42
|
+
|
30
43
|
def deployer
|
31
44
|
payload["sender"]["login"]
|
32
45
|
end
|
33
|
-
|
46
|
+
|
34
47
|
def ref
|
35
48
|
deploy["ref"]
|
36
|
-
end
|
37
|
-
|
49
|
+
end
|
50
|
+
|
38
51
|
def attributes
|
39
52
|
{
|
40
53
|
status: status,
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -1,10 +1,23 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
4
17
|
class Fork < Hook
|
5
18
|
include Lita::Extensions::GitHubWebHooksCore::Hooks::RepoHooks
|
6
19
|
def forker
|
7
|
-
payload["sender"]["login"]
|
20
|
+
payload["sender"]["login"]
|
8
21
|
end
|
9
22
|
def source
|
10
23
|
payload["forkee"]["full_name"]
|
@@ -18,7 +31,7 @@ module Lita::Extensions
|
|
18
31
|
source: source,
|
19
32
|
target: target
|
20
33
|
}
|
21
|
-
end
|
34
|
+
end
|
22
35
|
end
|
23
36
|
end
|
24
37
|
end
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -1,13 +1,26 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore::Hooks
|
3
16
|
class Hook
|
4
|
-
|
17
|
+
|
5
18
|
attr_accessor :payload
|
6
|
-
|
19
|
+
|
7
20
|
def initialize(payload)
|
8
21
|
@payload = payload
|
9
22
|
end
|
10
|
-
|
23
|
+
|
11
24
|
end
|
12
25
|
end
|
13
26
|
end
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -6,31 +19,31 @@ module Lita::Extensions
|
|
6
19
|
def body
|
7
20
|
comment["body"]
|
8
21
|
end
|
9
|
-
|
22
|
+
|
10
23
|
def comment
|
11
24
|
payload["comment"]
|
12
25
|
end
|
13
|
-
|
26
|
+
|
14
27
|
def commenter
|
15
28
|
payload["sender"]["login"]
|
16
29
|
end
|
17
|
-
|
30
|
+
|
18
31
|
def url
|
19
32
|
comment["html_url"]
|
20
33
|
end
|
21
|
-
|
34
|
+
|
22
35
|
def issue
|
23
36
|
payload["issue"]
|
24
37
|
end
|
25
|
-
|
38
|
+
|
26
39
|
def number
|
27
40
|
issue["number"]
|
28
41
|
end
|
29
|
-
|
42
|
+
|
30
43
|
def target
|
31
44
|
issue["title"]
|
32
45
|
end
|
33
|
-
|
46
|
+
|
34
47
|
def attributes
|
35
48
|
{
|
36
49
|
body: body,
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -1,8 +1,21 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
4
17
|
class Member < Hook
|
5
|
-
include Lita::Extensions::GitHubWebHooksCore::Hooks::RepoHooks
|
18
|
+
include Lita::Extensions::GitHubWebHooksCore::Hooks::RepoHooks
|
6
19
|
def admin
|
7
20
|
payload["sender"]["login"]
|
8
21
|
end
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# Copyright 2015 Levvel, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the License for the specific language governing permissions and
|
12
|
+
# limitations under the License.
|
13
|
+
|
1
14
|
module Lita::Extensions
|
2
15
|
module GitHubWebHooksCore
|
3
16
|
module Hooks
|
@@ -7,7 +20,7 @@ module Lita::Extensions
|
|
7
20
|
{
|
8
21
|
repo: repo
|
9
22
|
}
|
10
|
-
end
|
23
|
+
end
|
11
24
|
end
|
12
25
|
end
|
13
26
|
end
|