Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
VRT_BRANCHNAME: ${{ github.head_ref || github.ref_name }}
VRT_CIBUILDID: "Github run_id: ${{ github.run_id }}"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down
29 changes: 29 additions & 0 deletions src/components/ProjectForm/ProjectForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,35 @@ export const ProjectForm: React.FunctionComponent = () => {
});
}}
/>
<TextValidator
name="protectedBranch"
validators={project.protectedBranch ? ["minStringLength:2"] : []}
errorMessages={["Enter at least two characters."]}
margin="dense"
id="protectedBranch"
label="Protected branch"
type="text"
fullWidth
helperText={
<>
PostgreSQL{" "}
<a
target="_blank"
rel="noreferrer"
href="https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP"
>
SIMILAR TO Regular Expression
</a>
</>
}
value={project.protectedBranch || ""}
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
setProjectEditState(projectDispatch, {
...project,
protectedBranch: event.target.value,
})
}
/>
<FormControlLabel
label="Auto approve feature"
control={
Expand Down
1 change: 1 addition & 0 deletions src/types/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface Project {
imageComparisonConfig: string;
maxBuildAllowed: number;
maxBranchLifetime: number;
protectedBranch?: string;
}

export type ProjectDto = Omit<Project, "updatedAt" | "createdAt" | "builds">;
Loading