One Netlify function to handle individual tokens
This commit is contained in:
parent
f0742ee107
commit
2363d42c15
7 changed files with 105 additions and 143 deletions
|
@ -6,8 +6,8 @@ const handler: Handler = async () => {
|
|||
const octokit = new Octokit({auth: process.env.API_GITHUB});
|
||||
const github = await octokit.rest.activity.listEventsForAuthenticatedUser({username: "TTTaevas"});
|
||||
|
||||
const publicPush = github.data.find((e) => e.type === "PushEvent" && e.public);
|
||||
const privatePush = github.data.find((e) => e.type === "PushEvent" && !e.public);
|
||||
const publicPush = github.data.find((e) => (e.type === "PushEvent" || e.type === "PullRequestEvent") && e.public);
|
||||
const privatePush = github.data.find((e) => (e.type === "PushEvent" || e.type === "PullRequestEvent") && !e.public);
|
||||
|
||||
const info: GithubInfo = {
|
||||
public: publicPush ? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue