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
227 stars 149 forks source link

Warn people with invalid profile pictures #177

Closed fatih-yavuz closed 1 year ago

fatih-yavuz commented 1 year ago

Each night, run a job to validate the content of people's page.json and their profile images.

If something is wrong, automatically create an issue and tag the person

esau-morais commented 1 year ago

Searching more about a workaround to this issue:

  1. Run every night
on:
  schedule:
    - cron: '0 0 * * *'
  1. Create an issue and tag the person

Make a POST HTTP request to the GitHub endpoint responsible to create an issue https://api.github.com/repos/fatih-yavuz/links.dev/issues (it is needed an authentication token, tho)

  1. Validate profile picture

Use fs to read the file and sharp to validate the metadata

Alternative: Use regEx to validate and conditionally tell what's an image

haliliceylan commented 1 year ago

It doesn't make much sense to me to check people all the time, I also think that opening an issue on github can be completely dirty.

We can change the page of users whose profile photos or page.jsons are not correct (a popup or a warning banner)