accesslint-ci 0.2.4 → 0.2.5
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 +4 -4
- data/README.md +1 -1
- data/lib/accesslint/ci/commenter.rb +8 -6
- data/lib/accesslint/ci/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b03d46db4534888cef8809d5f99dc1f03ab2814
|
|
4
|
+
data.tar.gz: ebdd38802971de35e23c6da1e5cc1098da96aab6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6dd5fa3d422702e4a7c55259b85ed21ad2fbec4f940d64476fc446e8be859f5467b5c33c45b32d6d03675325aaae3a5ff404776700798f9a89fbe5219f8c1af
|
|
7
|
+
data.tar.gz: 9b3197d928b56d8f86dcdf9e8eff1ba0586dbf0819a63262dbce98a98012a5272fc9c8cb0454bef85d0c1b0a71c957be2143acf61a176db430a65776fe265e5c
|
data/README.md
CHANGED
|
@@ -30,7 +30,7 @@ general:
|
|
|
30
30
|
machine:
|
|
31
31
|
environment:
|
|
32
32
|
CIRCLE_TOKEN: <CircleCI API token>
|
|
33
|
-
|
|
33
|
+
ACCESSLINT_API_TOKEN: <API token from https://accesslint.com>
|
|
34
34
|
ACCESSLINT_GITHUB_USER: <GitHub user authenticated at https://accesslint.com>
|
|
35
35
|
node:
|
|
36
36
|
version: 6.1.0
|
|
@@ -36,14 +36,16 @@ module Accesslint
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def authentication
|
|
39
|
-
"#{
|
|
39
|
+
"#{github_user}:#{ENV.fetch('ACCESSLINT_API_TOKEN')}"
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def pull_request_number
|
|
43
|
-
if !ENV.fetch("
|
|
44
|
-
ENV.fetch("
|
|
43
|
+
if !ENV.fetch("CI_PULL_REQUEST", "").empty?
|
|
44
|
+
ENV.fetch("CI_PULL_REQUEST").split("/").last
|
|
45
45
|
else
|
|
46
|
-
raise CommenterError.new(
|
|
46
|
+
raise CommenterError.new(
|
|
47
|
+
"Failed to comment: CI_PULL_REQUEST is missing."
|
|
48
|
+
)
|
|
47
49
|
end
|
|
48
50
|
end
|
|
49
51
|
|
|
@@ -52,12 +54,12 @@ module Accesslint
|
|
|
52
54
|
end
|
|
53
55
|
|
|
54
56
|
def github_user
|
|
55
|
-
ENV.fetch("
|
|
57
|
+
ENV.fetch("ACCESSLINT_GITHUB_USER")
|
|
56
58
|
end
|
|
57
59
|
|
|
58
60
|
def project_path
|
|
59
61
|
[
|
|
60
|
-
|
|
62
|
+
ENV.fetch("CIRCLE_PROJECT_USERNAME"),
|
|
61
63
|
ENV.fetch("CIRCLE_PROJECT_REPONAME"),
|
|
62
64
|
].join("/")
|
|
63
65
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: accesslint-ci
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cameron Cundiff
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-12-
|
|
11
|
+
date: 2016-12-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|