File tree Expand file tree Collapse file tree
packages/web/src/features/agents/review-agent Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export const gitlabMrParser = async (
9797 repo : repoName ,
9898 file_diffs : filteredSourcebotFileDiffs ,
9999 number : mrIid ,
100- head_sha : mr . sha ?? "" ,
100+ head_sha : mr . sha ?? mrPayload . object_attributes . last_commit . id ,
101101 diff_refs : mr . diff_refs != null
102102 ? mr . diff_refs as { base_sha : string ; head_sha : string ; start_sha : string }
103103 : undefined ,
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ const gitLabDiffRefsSchema = z.object({
7171} ) . nullable ( ) . optional ( ) ;
7272
7373export const gitLabMergeRequestPayloadSchema = z . object ( {
74- object_kind : z . string ( ) ,
74+ object_kind : z . literal ( 'merge_request' ) ,
7575 object_attributes : z . object ( {
7676 iid : z . number ( ) ,
7777 title : z . string ( ) ,
@@ -85,10 +85,10 @@ export const gitLabMergeRequestPayloadSchema = z.object({
8585export type GitLabMergeRequestPayload = z . infer < typeof gitLabMergeRequestPayloadSchema > ;
8686
8787export const gitLabNotePayloadSchema = z . object ( {
88- object_kind : z . string ( ) ,
88+ object_kind : z . literal ( 'note' ) ,
8989 object_attributes : z . object ( {
9090 note : z . string ( ) ,
91- noteable_type : z . string ( ) ,
91+ noteable_type : z . literal ( 'MergeRequest' ) ,
9292 } ) ,
9393 merge_request : z . object ( {
9494 iid : z . number ( ) ,
You can’t perform that action at this time.
0 commit comments