fatih-yavuz / links.dev

A free linktree alternative only for devs. Get a nice page at links.dev/username. Simple site to group all your links. Register your username before someone else does.
MIT License
229 stars 148 forks source link

duplicate check for github usernames in registry.yaml #124

Closed haliliceylan closed 1 year ago

haliliceylan commented 1 year ago

fix #108

fatih-yavuz commented 1 year ago

@haliliceylan thank you for the contribution. Do you mind putting this check into a function and adding a test for it? If you need help, I and (I am pretty sure) @bsoyka can help you

esau-morais commented 1 year ago

@haliliceylan thank you for the contribution. Do you mind putting this check into a function and adding a test for it? If you need help, I and (I am pretty sure) @bsoyka can help you

I enforce Fatih's suggestion

fatih-yavuz commented 1 year ago

@haliliceylan thank you for the contribution. Do you mind putting this check into a function and adding a test for it? If you need help, I and (I am pretty sure) @bsoyka can help you

I enforce Fatih's suggestion

@esau-morais what do you mean by that?

esau-morais commented 1 year ago

@haliliceylan thank you for the contribution. Do you mind putting this check into a function and adding a test for it? If you need help, I and (I am pretty sure) @bsoyka can help you

I enforce Fatih's suggestion

@esau-morais what do you mean by that?

I'm just agreeing that it'd would be great to apply your suggestion

haliliceylan commented 1 year ago

@haliliceylan thank you for the contribution. Do you mind putting this check into a function and adding a test for it? If you need help, I and (I am pretty sure) @bsoyka can help you

I can move it to a separate function. I would love to write to tests !

Test scenarios can be as follows;

Is there a test written for CI Script as an example in this repository?

fatih-yavuz commented 1 year ago

@haliliceylan thank you for the contribution. Do you mind putting this check into a function and adding a test for it? If you need help, I and (I am pretty sure) @bsoyka can help you

I enforce Fatih's suggestion

@esau-morais what do you mean by that?

I'm just agreeing that it'd would be great to apply your suggestion

Thank you. I wasn't sure whether you were applying the suggestion or just supporting the idea. Thanks for the explanation

fatih-yavuz commented 1 year ago

@haliliceylan thank you for the contribution. Do you mind putting this check into a function and adding a test for it? If you need help, I and (I am pretty sure) @bsoyka can help you

I can move it to a separate function. I would love to write to tests !

Test scenarios can be as follows;

  • correct scenario, 2 different github usernames, 2 different domains
  • wrong scenario, 2 same github username, 2 different domains

Is there a test written for CI Script as an example in this repository?

No, but I will set it up in a few hours

fatih-yavuz commented 1 year ago

I see that you already did 🚀 @haliliceylan

haliliceylan commented 1 year ago

I separated my function, also I created a separate file for my function. Because If I try to import the "check-registry.js" file, main() function is working and gives an error. So I created a new folder for registry file related checks then I put my script into it.

I installed the jest package.

I create a GitHub workflow file for when "ci" folder changes, it will run all tests under "ci" folder. idk is working or not; In my local I tried with "act" command (local github workflow simulator) and it seems ok

haliliceylan commented 1 year ago

oh i forget to add pull_request in workflow file...

fatih-yavuz commented 1 year ago

oh i forget to add pull_request in workflow file...

I fixed it now. I am merging it. Thank you