seira 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cedfa6841e5eaab7d04673e58182a6eeed7309999ebca2571fba54a2da8379e
4
- data.tar.gz: ac45a36439ed8e56e856f6ecf917d848606b14b85752e034bacd86def1a90241
3
+ metadata.gz: e10cda9c969f7e1401f200a538d380f397c1061f4040bef400961a9b74b28b93
4
+ data.tar.gz: 66f4790fa1d7fb8b5ea58d7bb798206cb375d2329b12a029714003f45633e9af
5
5
  SHA512:
6
- metadata.gz: '0946ca82098b4c329f04d91a6b8aefd831baa887ba638712e8779ded8494aac3883c9a09e79c49aa916102a758fab822e89ef42a0ed53a36cf0cb7b1f70bc10b'
7
- data.tar.gz: 9fd9290e4778264498de98cdf37a55fe8bb67cd431c76410c6cc25fe0ea5fef120415a9dad4101fecb6828c1816daab254142b183c47cc41fc135b24a7ef1891
6
+ metadata.gz: f0534e0ab281bdd9667f8bae85a72464dadc042d3bed0a79f784251df7a3e15b2fd76809efd19fd1edcee5b78697ff8392245a347a98ee2bd451c6d7d19a341d
7
+ data.tar.gz: e85b638eeef614999f8c67dc40933f43ce61e2180fe020fb81cc22e79c67a1a2de6b57c1904062c57fb80c3c7c57264c129d1d75a333876b423fab629d355a81
@@ -0,0 +1,21 @@
1
+ name: Trunk Check
2
+ on: [pull_request]
3
+ concurrency:
4
+ group: ${{ github.head_ref || github.run_id }}
5
+ cancel-in-progress: true
6
+
7
+ permissions: read-all
8
+
9
+ jobs:
10
+ trunk_check:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ checks: write # For trunk to post annotations
14
+ contents: read # For repo checkout
15
+
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v3
19
+
20
+ - name: Trunk Check
21
+ uses: trunk-io/trunk-action@v1.1.7
data/.trunk/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ *out
2
+ *logs
3
+ *actions
4
+ *notifications
5
+ *tools
6
+ plugins
7
+ user_trunk.yaml
8
+ user.yaml
@@ -0,0 +1,10 @@
1
+ # Autoformatter friendly markdownlint config (all formatting rules disabled)
2
+ default: true
3
+ blank_lines: false
4
+ bullet: false
5
+ html: false
6
+ indentation: false
7
+ line_length: false
8
+ spaces: false
9
+ url: false
10
+ whitespace: false
@@ -0,0 +1,7 @@
1
+ enable=all
2
+ source-path=SCRIPTDIR
3
+ disable=SC2154
4
+
5
+ # If you're having issues with shellcheck following source, disable the errors via:
6
+ # disable=SC1090
7
+ # disable=SC1091
@@ -0,0 +1,10 @@
1
+ rules:
2
+ quoted-strings:
3
+ required: only-when-needed
4
+ extra-allowed: ["{|}"]
5
+ empty-values:
6
+ forbid-in-block-mappings: true
7
+ forbid-in-flow-mappings: true
8
+ key-duplicates: {}
9
+ octal-values:
10
+ forbid-implicit-octal: true
data/.trunk/trunk.yaml ADDED
@@ -0,0 +1,34 @@
1
+ version: 0.1
2
+ cli:
3
+ version: 1.14.1
4
+ plugins:
5
+ sources:
6
+ - id: trunk
7
+ ref: v1.2.1
8
+ uri: https://github.com/trunk-io/plugins
9
+ runtimes:
10
+ enabled:
11
+ - go@1.19.5
12
+ - node@18.12.1
13
+ - python@3.10.8
14
+ - ruby@3.1.4
15
+ lint:
16
+ enabled:
17
+ - actionlint@1.6.25
18
+ - checkov@2.4.6
19
+ - git-diff-check
20
+ - markdownlint@0.35.0
21
+ - prettier@3.0.2
22
+ - shellcheck@0.9.0
23
+ - shfmt@3.6.0
24
+ - trivy@0.44.1
25
+ - trufflehog@3.48.0
26
+ - yamllint@1.32.0
27
+ disabled:
28
+ - rubocop@1.39.0
29
+ actions:
30
+ enabled:
31
+ - trunk-announce
32
+ - trunk-check-pre-push
33
+ - trunk-fmt-pre-commit
34
+ - trunk-upgrade-available
data/lib/seira/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Seira
2
- VERSION = "0.8.2".freeze
2
+ VERSION = "0.8.3".freeze
3
3
  end
data/lib/seira.rb CHANGED
@@ -127,7 +127,14 @@ module Seira
127
127
  status = Seira::Teleport::Status.new
128
128
 
129
129
  unless required_roles.empty? || required_roles.any? { |r| status.has_role?(r) }
130
- Seira::Teleport::Request.new(required_roles, reviewer: ENV['TELEPORT_REVIEWER'], context: passed_context).invoke
130
+ reviewer = ENV['TELEPORT_REVIEWER']
131
+ args.each do |arg|
132
+ if arg.start_with? '--reviewer='
133
+ reviewer = arg.split('=')[1]
134
+ end
135
+ end
136
+
137
+ Seira::Teleport::Request.new(required_roles, reviewer: reviewer, context: passed_context).invoke
131
138
  end
132
139
  end
133
140
 
@@ -180,7 +187,9 @@ module Seira
180
187
 
181
188
  # The first arg must always be the cluster. This ensures commands are not run by
182
189
  # accident on the wrong kubernetes cluster or gcloud project.
183
- exit(1) unless Seira::Cluster.new(action: nil, args: nil, context: nil, settings: settings).switch(target_cluster: cluster, verbose: false)
190
+ exit(1) unless Seira::Cluster.new(action: nil, args: nil, context: nil, settings: settings).switch(
191
+ target_cluster: cluster, verbose: false
192
+ )
184
193
  exit(0) if simple_cluster_change?
185
194
  end
186
195
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seira
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Ringwelski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-21 00:00:00.000000000 Z
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -102,13 +102,17 @@ executables:
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
- - ".default-rubocop.yml"
106
105
  - ".github/workflows/ruby.yml"
106
+ - ".github/workflows/trunk.yml"
107
107
  - ".gitignore"
108
108
  - ".hound.yml"
109
109
  - ".rspec"
110
- - ".rubocop.yml"
111
110
  - ".ruby-version"
111
+ - ".trunk/.gitignore"
112
+ - ".trunk/configs/.markdownlint.yaml"
113
+ - ".trunk/configs/.shellcheckrc"
114
+ - ".trunk/configs/.yamllint.yaml"
115
+ - ".trunk/trunk.yaml"
112
116
  - Gemfile
113
117
  - LICENSE
114
118
  - README.md