Verified Commit be9d4bcc authored by Jean-Gabriel Doyon's avatar Jean-Gabriel Doyon Committed by GitLab
Browse files

fix(ontology): add commit_sha and position fields to source_code default_columns

parent e6a92fb1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ domain: source_code
description: A code definition such as a class, function, method, or module
label: name
destination_table: gl_definition
default_columns: [id, name, fqn, definition_type, file_path]
default_columns: [id, name, fqn, definition_type, file_path, commit_sha, start_line, end_line]
sort_key: [traversal_path, project_id, branch, id]

style:
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ domain: source_code
description: A directory within a repository's file structure
label: path
destination_table: gl_directory
default_columns: [id, path, name]
default_columns: [id, path, name, commit_sha]
sort_key: [traversal_path, project_id, branch, id]

style:
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ domain: source_code
description: A source code file within a repository
label: path
destination_table: gl_file
default_columns: [id, path, name, language]
default_columns: [id, path, name, language, commit_sha]
sort_key: [traversal_path, project_id, branch, id]

style:
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ domain: source_code
description: An imported symbol or module reference within a source file
label: identifier_name
destination_table: gl_imported_symbol
default_columns: [id, identifier_name, import_path, import_type, file_path]
default_columns: [id, identifier_name, import_path, import_type, file_path, commit_sha, start_line, end_line]
sort_key: [traversal_path, project_id, branch, id]

style:
+10 −1
Original line number Diff line number Diff line
@@ -1996,7 +1996,16 @@ style:
            .expect("Definition should exist");
        assert_eq!(
            definition.default_columns,
            vec!["id", "name", "fqn", "definition_type", "file_path"]
            vec![
                "id",
                "name",
                "fqn",
                "definition_type",
                "file_path",
                "commit_sha",
                "start_line",
                "end_line"
            ]
        );
    }