mirror of
https://github.com/LukeHagar/stats-action.git
synced 2025-12-06 04:21:26 +00:00
pushing username changes
This commit is contained in:
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
@@ -8,6 +8,8 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: ./
|
||||
with:
|
||||
username: lukehagar
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
|
||||
@@ -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] =
|
||||
|
||||
Reference in New Issue
Block a user