Skip to content

Commit c069b07

Browse files
Merge pull request #565 from CodebilityDev/githublink/juryyy
fix(applicant): update GitHub URL validation to allow .git suffix
2 parents a15e038 + f4e36c8 commit c069b07

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/codebility/app/applicant/waiting/_components/applicantStep2.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function PostReadInstructions({
152152
if (user?.display_position.includes("UI/UX Designer") === false) {
153153
// Validate the fork url
154154
const urlPattern =
155-
/^(https?:\/\/)?(www\.)?github\.com\/[a-zA-Z0-9_-]+\/codebility-assessment(\/.*)?$/;
155+
/^(https?:\/\/)?(www\.)?github\.com\/[a-zA-Z0-9_-]+\/codebility-assessment(\.git)?(\/.*)?$/;
156156

157157
if (!urlPattern.test(data.fork_url)) {
158158
throw new Error(
@@ -285,7 +285,7 @@ function PostSubmitted({
285285
if (user?.display_position.includes("UI/UX Designer") === false) {
286286
// Validate the fork url
287287
const urlPattern =
288-
/^(https?:\/\/)?(www\.)?github\.com\/[a-zA-Z0-9_-]+\/codebility-assessment(\/.*)?$/;
288+
/^(https?:\/\/)?(www\.)?github\.com\/[a-zA-Z0-9_-]+\/codebility-assessment(\.git)?(\/.*)?$/;
289289

290290
if (!urlPattern.test(data.fork_url)) {
291291
throw new Error(

0 commit comments

Comments
 (0)