gitlab-ci-lint 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/console +6 -6
- data/lib/gitlab/ci/lint.rb +1 -1
- data/lib/gitlab/ci/lint/actions.rb +1 -1
- data/lib/gitlab/ci/lint/client.rb +1 -1
- data/lib/gitlab/ci/lint/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61518047327c349d0a489d88f447fedafa791904bbeeed237ca311805853180d
|
4
|
+
data.tar.gz: ac121706ab1b543112d0932bb6b455b3c67c30b57d06eea0c268b2d5ca9c9ecc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a23bbc3a10fa66b6ef0cce2c23b0af19e81283fa991c4a331ec9d906fcf32d0f7ba9d0d1fc91c221cc4af4b3e40cd0198cc5adeece03c16510604f0982353ae0
|
7
|
+
data.tar.gz: 49d8c1cdbeb73342f5704cd9e1a93a033ed700308718bcab6036790b84c35faea7c786aaadbeff62a4623cd7267c0a3d0060842b264b99a69faa02138e7733c7
|
data/bin/console
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require "bundler/setup"
|
2
|
-
require "pry"
|
3
|
-
|
4
|
-
require File.expand_path(
|
5
|
-
|
6
|
-
Pry.start
|
1
|
+
require "bundler/setup"
|
2
|
+
require "pry"
|
3
|
+
|
4
|
+
require File.expand_path("../lib/gitlab/ci/lint", __dir__)
|
5
|
+
|
6
|
+
Pry.start
|
data/lib/gitlab/ci/lint.rb
CHANGED
@@ -41,7 +41,7 @@ module Gitlab
|
|
41
41
|
|
42
42
|
logger.info("Starting GitLab CI YML Validation...")
|
43
43
|
|
44
|
-
headers = gitlab_token ? { "Content-Type" => "application/json", "Private-Token" => gitlab_token } : { "Content-Type" => "application/json"}
|
44
|
+
headers = gitlab_token ? { "Content-Type" => "application/json", "Private-Token" => gitlab_token } : { "Content-Type" => "application/json" }
|
45
45
|
|
46
46
|
actions.validate_gitlab_ci_yml(gitlab_endpoint, gitlab_ci_file, headers, timeout)
|
47
47
|
|
@@ -7,7 +7,7 @@ module GitLab
|
|
7
7
|
class Actions < GitLab::CI::Lint::Client
|
8
8
|
|
9
9
|
def validate_gitlab_ci_yml url, content, headers, timeout
|
10
|
-
result = post(url, headers, timeout
|
10
|
+
result = post(url, content, headers, timeout)
|
11
11
|
message = GitLab::CI::Lint::Serializer.new(result)
|
12
12
|
if result["status"] == "valid"
|
13
13
|
message.success()
|
@@ -12,7 +12,7 @@ module GitLab
|
|
12
12
|
begin
|
13
13
|
if content = GitLab::CI::Lint::YMLReader.new(content).get_json_content()
|
14
14
|
body = { content: content }.to_json
|
15
|
-
request = self.class.post(url, :body => body, :headers => headers
|
15
|
+
request = self.class.post(url, :body => body, :headers => headers)
|
16
16
|
if request.code == 200
|
17
17
|
puts "\nSuccessful request!"
|
18
18
|
return JSON.parse(request.body)
|