Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

Commit 4e8a64a

Browse files
committed
freeze the strings
1 parent 2832ac6 commit 4e8a64a

27 files changed

+53
-5
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require: rubocop-rspec
44

55
Style/FrozenStringLiteralComment:
6-
Enabled: false
6+
Enabled: always
77

88
AllCops:
99
TargetRubyVersion: 2.5

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ GEM
4343
octokit (4.8.0)
4444
sawyer (~> 0.8.0, >= 0.5.3)
4545
parallel (1.12.1)
46-
parser (2.5.0.0)
46+
parser (2.5.0.2)
4747
ast (~> 2.4.0)
4848
powerpack (0.1.1)
4949
pry (0.11.3)
@@ -79,7 +79,7 @@ GEM
7979
rainbow (>= 2.2.2, < 4.0)
8080
ruby-progressbar (~> 1.7)
8181
unicode-display_width (~> 1.0, >= 1.0.1)
82-
rubocop-rspec (1.22.2)
82+
rubocop-rspec (1.23.0)
8383
rubocop (>= 0.52.1)
8484
ruby-progressbar (1.9.0)
8585
safe_yaml (1.0.4)

assets/lib/commands/base.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'faraday'
24
require 'octokit'
35
require 'faraday-http-cache'

assets/lib/commands/check.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
23

34
require 'json'
45
require_relative 'base'

assets/lib/commands/in.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
23

34
require 'English'
45
require 'json'

assets/lib/commands/out.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
23

34
require 'json'
45
require_relative 'base'
@@ -86,10 +87,11 @@ def output
8687
private
8788

8889
def whitelist(context:)
90+
c = context.dup
8991
%w[BUILD_ID BUILD_NAME BUILD_JOB_NAME BUILD_PIPELINE_NAME BUILD_TEAM_NAME ATC_EXTERNAL_URL].each do |name|
90-
context.gsub!("$#{name}", ENV[name] || '')
92+
c.gsub!("$#{name}", ENV[name] || '')
9193
end
92-
context
94+
c
9395
end
9496

9597
def params

assets/lib/filters/all.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'octokit'
24
require_relative '../pull_request'
35

assets/lib/filters/ci_skip.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Filters
24
class CISkip
35
def initialize(pull_requests:, input: Input.instance)

assets/lib/filters/fork.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Filters
24
class Fork
35
def initialize(pull_requests:, input: Input.instance)

assets/lib/filters/label.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Filters
24
class Label
35
def initialize(pull_requests:, input: Input.instance)

0 commit comments

Comments
 (0)