Skip to content

Commit

Permalink
new updated version complete
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilmhdh committed Dec 5, 2020
1 parent 12c46e5 commit 3d4ba16
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
11 changes: 3 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { context } from '@actions/github';
import octokit from './octokit';

import buildContributorsList from './core';
import getSponserListQuery from './query/getSponsorsList.gql';
import getSponsorListQuery from './query/getSponsorsList.gql';

async function run() {
try {
Expand Down Expand Up @@ -43,9 +43,7 @@ async function run() {
repo,
affiliation
});
console.log(JSON.stringify(contributorsList.data, null, 4));
console.log(JSON.stringify(collaboratorsList.data, null, 4));
const sponsersList = await octokit.graphql(getSponserListQuery, { owner });
const sponsorsList = await octokit.graphql(getSponsorListQuery, { owner });

// get data of contributors
// collaborators
Expand All @@ -72,15 +70,14 @@ async function run() {
name: login,
type: 'bot'
}));
const sponsers = sponsersList.user.sponsorshipsAsMaintainer.nodes.map(
const sponsors = sponsorsList.user.sponsorshipsAsMaintainer.nodes.map(
({ sponsorEntity: { name, login, avatarUrl } }) => ({
name,
login,
avatar_url: avatarUrl
})
);
const bots = [...contributorsBots, ...collaboratorsBots];
console.log({ contributorsBots, collaboratorsBots, bots });
// parse the base64 readme
let content = Buffer.from(readme.data.content, 'base64').toString('ascii');
const prevContent = content;
Expand Down Expand Up @@ -108,7 +105,7 @@ async function run() {
contributors,
collaborators,
bots,
sponsers,
sponsors,
content
);
}
Expand Down
2 changes: 0 additions & 2 deletions src/utils/templateBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ const templateBuilder = async (contributors, prevContributors, type) => {
column++
) {
const { login, avatar_url, type } = contributors[(row - 1) * columns + column - 1];
console.log({ login, avatar_url, type });
console.log(JSON.stringify(prevContributors, null, 4));

if (type !== 'bot') {
const { name, url } = await getUserInfo(login, avatar_url, prevContributors);
Expand Down

0 comments on commit 3d4ba16

Please sign in to comment.