Skip to content

Commit

Permalink
Make project_metadata mandatory in scan_request (try 2)
Browse files Browse the repository at this point in the history
try2 of #316

Step1 towards getting rid of meta.

test plan:
see related PR in semgrep-pro
  • Loading branch information
aryx committed Dec 4, 2024
1 parent 24830ff commit 4943191
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 205 deletions.
15 changes: 10 additions & 5 deletions semgrep_output_v1.atd
Original file line number Diff line number Diff line change
Expand Up @@ -1357,12 +1357,17 @@ type scan_metadata = {

(* Sent by the CLI to the POST /api/cli/scans to create a scan. *)
type scan_request = {
(* until 1.43ish, was 'meta: project_metadata;' before *)
meta: raw_json;
(* from 1.43 *)
?project_metadata: project_metadata option; (* replacing meta *)
(* added in 1.43 as options, and mandatory since 1.99.0 (replacing meta) *)
project_metadata: project_metadata;
scan_metadata: scan_metadata;

(* added in 1.43 (used to be in meta) *)
?project_config: ci_config_from_repo option;
?scan_metadata: scan_metadata option;

(* deprecated: moved as an option in 1.98.0 and was used until 1.43ish
* old: 'meta: project_metadata;' before 1.43
*)
?meta: raw_json option;
}

(* Response from the backend to the CLI to the POST /api/cli/scans *)
Expand Down
6 changes: 3 additions & 3 deletions semgrep_output_v1.jsonschema

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

6 changes: 3 additions & 3 deletions semgrep_output_v1.proto

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

21 changes: 10 additions & 11 deletions semgrep_output_v1.py

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

18 changes: 9 additions & 9 deletions semgrep_output_v1.ts

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

Loading

0 comments on commit 4943191

Please sign in to comment.