pushing username changes

This commit is contained in:
luke-hagar-sp
2024-02-29 15:10:17 -05:00
parent 911fcb9ba3
commit 68463d649c
2 changed files with 7 additions and 2 deletions

View File

@@ -8,6 +8,8 @@ jobs:
- uses: actions/checkout@v3
- uses: ./
with:
username: lukehagar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:

View File

@@ -258,12 +258,15 @@ try {
const token = process.env["GITHUB_TOKEN"];
if (!token) throw new Error("GITHUB_TOKEN is not present");
const username = core.getInput("username");
if (!username) throw new Error("Username is not present");
const octokit = new Octokit({ auth: token });
const fetchedAt = Date.now();
const userDetails = await octokit.rest.users.getAuthenticated();
const username = userDetails.data.login;
const userDetails = await octokit.rest.users.getByUsername({ username });
const accountCreationDate = userDetails.data.created_at;
const [graphQLData, totalCommits, contributionsCollection] =