Skip to content

Commit

Permalink
Add ml field to CreateProjectLabelInput and UpdateProjectLabelInput
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielrindlaub committed Aug 22, 2024
1 parent 05479f4 commit 7754ca4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/@types/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export type CreateProjectInput = {

export type CreateProjectLabelInput = {
color: Scalars['String']['input'];
ml?: InputMaybe<Scalars['Boolean']['input']>;
name: Scalars['String']['input'];
reviewerEnabled?: InputMaybe<Scalars['Boolean']['input']>;
};
Expand Down Expand Up @@ -1130,6 +1131,7 @@ export type UpdateProjectInput = {
export type UpdateProjectLabelInput = {
_id: Scalars['ID']['input'];
color: Scalars['String']['input'];
ml?: InputMaybe<Scalars['Boolean']['input']>;
name: Scalars['String']['input'];
reviewerEnabled?: InputMaybe<Scalars['Boolean']['input']>;
};
Expand Down
5 changes: 1 addition & 4 deletions src/api/db/models/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,7 @@ export class ProjectModel {
'A label with that name already exists, avoid creating labels with duplicate names',
);

project.labels.push({
name: input.name,
color: input.color,
});
project.labels.push(input);

await project.save();

Expand Down
1 change: 1 addition & 0 deletions src/api/type-defs/inputs/CreateProjectLabelInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ export default /* GraphQL */ `
name: String!
color: String!
reviewerEnabled: Boolean
ml: Boolean
}
`;
1 change: 1 addition & 0 deletions src/api/type-defs/inputs/UpdateProjectLabelInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export default /* GraphQL */ `
name: String!
color: String!
reviewerEnabled: Boolean
ml: Boolean
}
`;

0 comments on commit 7754ca4

Please sign in to comment.