@@ -128,14 +128,16 @@ def as_markdown_listing(elements: Iterable[str]):
128128 )
129129
130130
131- def create_security_issue (issue : Issue ) -> Tuple [str , str ]:
131+ def create_security_issue (issue : Issue , project = "" ) -> Tuple [str , str ]:
132132 # fmt: off
133133 command = [
134134 "gh" , "issue" , "create" ,
135135 "--label" , "security" ,
136136 "--title" , security_issue_title (issue ),
137137 "--body" , security_issue_body (issue ),
138138 ]
139+ if project :
140+ command .extend (['--project' , project ])
139141 # fmt: on
140142 try :
141143 result = subprocess .run (command , check = True , capture_output = True )
@@ -235,6 +237,9 @@ def create(
235237 input_file : typer .FileText = typer .Argument (
236238 default = "-" , mode = "r" , help = "file of cve's in the jsonl format"
237239 ),
240+ project : str = typer .Option (
241+ default = "" , help = "Project the created ticket shall be associated with."
242+ ),
238243) -> None :
239244 """
240245 Create GitHub issues for CVE's
@@ -246,7 +251,7 @@ def create(
246251 Links to the created issue(s)
247252 """
248253 for issue in _issues (input_file ):
249- std_err , std_out = create_security_issue (issue )
254+ std_err , std_out = create_security_issue (issue , project )
250255 stderr (std_err )
251256 stdout (std_out )
252257
0 commit comments