File tree Expand file tree Collapse file tree
apps/dashboard/server/api/projects/[id]/integrations/github Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export default defineEventHandler(async (event): Promise<GithubConfigDTO> => {
2626 defaultLabels : [ ] ,
2727 defaultAssignees : [ ] ,
2828 pushOnEdit : false ,
29+ autoCreateOnIntake : false ,
2930 lastSyncedAt : null ,
3031 failedJobs : [ ] ,
3132 }
@@ -53,6 +54,7 @@ export default defineEventHandler(async (event): Promise<GithubConfigDTO> => {
5354 defaultLabels : gi . defaultLabels ,
5455 defaultAssignees : gi . defaultAssignees ,
5556 pushOnEdit : gi . pushOnEdit ,
57+ autoCreateOnIntake : gi . autoCreateOnIntake ,
5658 lastSyncedAt : gi . updatedAt . toISOString ( ) ,
5759 failedJobs : failedJobs . map ( ( j ) => ( {
5860 reportId : j . reportId ,
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ export default defineEventHandler(async (event) => {
2828 ...( body . defaultLabels !== undefined ? { defaultLabels : body . defaultLabels } : { } ) ,
2929 ...( body . defaultAssignees !== undefined ? { defaultAssignees : body . defaultAssignees } : { } ) ,
3030 ...( body . pushOnEdit !== undefined ? { pushOnEdit : body . pushOnEdit } : { } ) ,
31+ ...( body . autoCreateOnIntake !== undefined
32+ ? { autoCreateOnIntake : body . autoCreateOnIntake }
33+ : { } ) ,
3134 updatedAt : new Date ( ) ,
3235 } )
3336 . where ( eq ( githubIntegrations . projectId , projectId ) )
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export const GithubConfigDTO = z.object({
99 defaultLabels : z . array ( z . string ( ) ) ,
1010 defaultAssignees : z . array ( z . string ( ) ) ,
1111 pushOnEdit : z . boolean ( ) ,
12+ autoCreateOnIntake : z . boolean ( ) ,
1213 lastSyncedAt : z . string ( ) . nullable ( ) ,
1314 failedJobs : z . array (
1415 z . object ( {
@@ -28,6 +29,7 @@ export const UpdateGithubConfigInput = z.object({
2829 defaultLabels : z . array ( z . string ( ) . min ( 1 ) . max ( 50 ) ) . max ( 20 ) . optional ( ) ,
2930 defaultAssignees : z . array ( z . string ( ) . min ( 1 ) . max ( 50 ) ) . max ( 20 ) . optional ( ) ,
3031 pushOnEdit : z . boolean ( ) . optional ( ) ,
32+ autoCreateOnIntake : z . boolean ( ) . optional ( ) ,
3133} )
3234export type UpdateGithubConfigInput = z . infer < typeof UpdateGithubConfigInput >
3335
You can’t perform that action at this time.
0 commit comments