Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions ext/code_ownership/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ crate-type = ["cdylib"]

[dependencies]
rb-sys = { version = "0.9.111", features = [
"bindgen-rbimpls",
"bindgen-deprecated-types",
"stable-api-compiled-fallback",
"bindgen-rbimpls",
"bindgen-deprecated-types",
"stable-api-compiled-fallback",
] }
magnus = { version = "0.7.1" }
serde = { version = "1.0.219", features = ["derive"] }
serde_magnus = "0.9.0"
codeowners = { git = "https://github.com/rubyatscale/codeowners-rs.git", tag = "v0.3.0" }
codeowners = { git = "https://github.com/rubyatscale/codeowners-rs.git", branch = "push-qoonoyqpvuwm" }

[dev-dependencies]
rb-sys = { version = "0.9.117", features = [
"link-ruby",
"bindgen-rbimpls",
"bindgen-deprecated-types",
"stable-api-compiled-fallback",
"link-ruby",
"bindgen-rbimpls",
"bindgen-deprecated-types",
"stable-api-compiled-fallback",
] }

[build-dependencies]
Expand Down
Binary file modified lib/code_ownership/code_ownership.bundle
Binary file not shown.
17 changes: 17 additions & 0 deletions spec/lib/code_ownership_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,23 @@
end
end

context 'when ownership is found via metadata.owner in package.yml' do
let(:file_path) { 'packs/metadata_owner_pack/some_file.rb' }

before do
write_file('packs/metadata_owner_pack/package.yml', <<~CONTENTS)
metadata:
owner: Foo
CONTENTS
write_file(file_path, '# some content')
RustCodeOwners.generate_and_validate(nil, false)
end

it 'returns the correct team' do
expect(subject).to eq CodeTeams.find('Foo')
end
end

context 'when ownership is found but team is not found' do
let(:file_path) { 'packs/my_pack/owned_file.rb' }
before do
Expand Down
Loading