Skip to content

LeoDog896/co-authored-by-deno

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

co-authored-by-deno

deno deploy function for co-authored-by.

The API is deployed on https://co-authored-by.deno.dev. Usage:

curl https://co-authored-by.deno.dev/username

For example:

curl https://co-authored-by.deno.dev/LeoDog896 # returns "Co-authored-by: Tristan F. <[email protected]>"

How does the API grab emails?

It does it in 4 steps, with a fallback to the next step if the previous one fails.

  1. Find a primary email address (are any social media accounts attached? Are one of these mail?)
  2. Find an email address from the latest commit (if this is a non-shadow email, use it).
  3. Use the modern shadow email (with an id, in the format [email protected]).
  4. Generate a legacy shadow email (without an ID).

API Signature

/ - 400, Bad Request, no username was provided (message can vary)

/<username> - 200, returns the exact Co-authored-by footer format as one line.

Note If the username does not exist OR the username is an organization, a 404 code will be returned instead.