Astrotomic / Astrotomic/.github

Create simple web-app that creates GitHub author by username

Open
#2 0 comments 0 reactions 1 assignee Claimed by @SarahSibert View on GitHub
good first issue help wanted
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

In open-source it's sometimes great to add someone else as author to a commit.
As it's nearly impossible to get the real email by the other user we can use the GitHub generated email address.
This email address isn't public - but it follows always the same structure.
Using the GitHub API we can create this by the username.

Somewhen back I've created a simple node.js CLI file that does the job.
But a simple web app that has an input and generates the same output would be great.

```js
const fetch = require('node-fetch');

const username = process.argv.slice(-1).pop();

fetch(`https://api.github.com/users/${username}`, {
method: 'GET',
headers: {
'user-agent': 'GitHub-Author-Generator',
}
})
.then(res => res.json())
.then(json => `${json.name} <${json.id}+${json.login}@users.noreply.github.com>`)
.then(console.log);
```

This script doesn't require any access token - so it should be possible to do the call in the users browser, so we can host it statically without any backend.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.