The text describes a method to add co-authors to a GitHub commit even if they don't have public email addresses. It provides a bash script to find a user's display name and a "noreply" email address from GitHub's API. This script utilizes `curl` and `jq` to fetch and parse user information based on their GitHub login. The script's output formats the co-author information in the required `Co-authored-by` format. The script is intended to be placed in the user's PATH, making it easily accessible. The example shows how the script is executed using the coauthoredby command followed by the co-author's GitHub login. It demonstrates how to incorporate the script within a git commit message for multi-line commits. The final result is a git commit with the co-author credited correctly. The commit log will display the author and co-author information. This streamlined process eliminates the need for manual email lookup when adding co-authors. This offers a convenient way to credit contributors without requiring them to explicitly publish their email.
sethmlarson.dev
sethmlarson.dev
Create attached notes ...
