Skip to content

Commit 5049e7e

Browse files
authored
Merge pull request #8 from rubyatscale/ph/skip-stage
Delegate to codeowners-rs to skip-stage
2 parents c4ed2a5 + dfea100 commit 5049e7e

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
fast_code_owners (0.0.10)
4+
fast_code_owners (0.0.11)
55
code_teams (~> 1.0)
66
packs-specification
77
sorbet-runtime

ext/fast_code_owners/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rb-sys = { version = "0.9.117", features = [
1717
magnus = { version = "0.7.1" }
1818
serde = { version = "1.0.219", features = ["derive"] }
1919
serde_magnus = "0.9.0"
20-
codeowners = { git = "https://github.com/rubyatscale/codeowners-rs.git", branch = "ph.fast-file-check" }
20+
codeowners = { git = "https://github.com/rubyatscale/codeowners-rs.git", branch = "ph.blazing-fast-for-file" }
2121

2222
[dev-dependencies]
2323
rb-sys = { version = "0.9.117", features = [

ext/fast_code_owners/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ fn validate() -> Result<Value, Error> {
4343
validate_result(&run_result)
4444
}
4545

46-
fn generate_and_validate() -> Result<Value, Error> {
46+
fn generate_and_validate(skip_stage: bool) -> Result<Value, Error> {
4747
let run_config = build_run_config();
48-
let run_result = runner::generate_and_validate(&run_config, vec![]);
48+
let run_result = runner::generate_and_validate(&run_config, vec![], skip_stage);
4949
validate_result(&run_result)
5050
}
5151

@@ -85,7 +85,7 @@ fn build_run_config() -> RunConfig {
8585
fn init(ruby: &Ruby) -> Result<(), Error> {
8686
let module = ruby.define_module("RustCodeOwners")?;
8787
module.define_singleton_method("for_file", function!(for_file, 1))?;
88-
module.define_singleton_method("generate_and_validate", function!(generate_and_validate, 0))?;
88+
module.define_singleton_method("generate_and_validate", function!(generate_and_validate, 1))?;
8989
module.define_singleton_method("validate", function!(validate, 0))?;
9090
module.define_singleton_method("for_team", function!(for_team, 1))?;
9191

lib/fast_code_owners.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def validate!(
3838
files: nil
3939
)
4040
if autocorrect
41-
::RustCodeOwners.generate_and_validate
41+
::RustCodeOwners.generate_and_validate(!stage_changes)
4242
else
4343
::RustCodeOwners.validate
4444
end

lib/fast_code_owners/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module FastCodeOwners
4-
VERSION = '0.0.10'
4+
VERSION = '0.0.11'
55
end

sorbet/rbi/manual.rbi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module RustCodeOwners
77
def for_file(file)
88
end
99

10-
def generate_and_validate
10+
def generate_and_validate(skip_stage)
1111
end
1212

1313
def validate

0 commit comments

Comments
 (0)