Skip to content

Commit

Permalink
chore: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
zugdev committed Jan 25, 2025
1 parent da89c2b commit 502c2d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GitHubOrganization, octokit } from "./directory";

export async function getPartnerProfilePictures(ownerName: string): Promise<{ownerName: string, avatar_url?: string}> {
export async function getPartnerAvatars(ownerName: string): Promise<{ownerName: string, avatar_url?: string}> {
const orgResp: GitHubOrganization[] = await octokit.paginate({
method: "GET",
url: `/orgs/${ownerName}`
Expand Down
6 changes: 3 additions & 3 deletions src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ export async function commitPullRequests(tasks: GitHubPullRequest[]) {
}
}

export async function commitPartnerProfilePictures(tasks: OrgNameAndAvatarUrl[]) {
export async function commitPartnerAvatars(tasks: OrgNameAndAvatarUrl[]) {
try {
await gitCommit(tasks, "devpool-partner-profile-pictures.json");
await gitCommit(tasks, "devpool-partner-avatars.json");
} catch (error) {
console.error(`Error preparing devpool profile pictures for github file: ${error}`);
console.error(`Error preparing devpool avatars for github file: ${error}`);
}
}

Expand Down
12 changes: 6 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { calculateStatistics } from "./directory/calculate-statistics";
import { DEVPOOL_OWNER_NAME, DEVPOOL_REPO_NAME, GitHubIssue, GitHubPullRequest, OrgNameAndAvatarUrl } from "./directory/directory";
import { getPartnerProfilePictures } from "./directory/get-partner-profile-pictures";
import { getPartnerAvatars } from "./directory/get-partner-avatars";
import { getPartnerUrls as getPartnerRepoUrls } from "./directory/get-partner-urls";
import { getRepoCredentials } from "./directory/get-repo-credentials";
import { getRepositoryIssues } from "./directory/get-repository-issues";
import { getRepositoryPullRequests } from "./directory/get-repository-pull-requests";
import { Statistics } from "./directory/statistics";
import { syncPartnerRepoIssues } from "./directory/sync-partner-repo-issues";
import { commitPartnerProfilePictures, commitPullRequests, commitStatistics, commitTasks } from "./git";
import { commitPartnerAvatars, commitPullRequests, commitStatistics, commitTasks } from "./git";
import { initializeTwitterMap, TwitterMap } from "./twitter/initialize-twitter-map";

export async function main() {
Expand All @@ -16,7 +16,7 @@ export async function main() {
const partnerRepoUrls = await getPartnerRepoUrls();
const taskList: GitHubIssue[] = [];
const pullRequestList: GitHubPullRequest[] = [];
const partnerProfilePicturesList: OrgNameAndAvatarUrl[] = [];
const partnerAvatarList: OrgNameAndAvatarUrl[] = [];

// for each project URL
for (const partnerRepoUrl of partnerRepoUrls) {
Expand All @@ -30,13 +30,13 @@ export async function main() {
pullRequestList.push(...pullRequests);

// get partner profile picture
const org: OrgNameAndAvatarUrl = await getPartnerProfilePictures(ownerName);
partnerProfilePicturesList.push(org);
const org: OrgNameAndAvatarUrl = await getPartnerAvatars(ownerName);
partnerAvatarList.push(org);
}

await commitTasks(taskList);
await commitPullRequests(pullRequestList);
await commitPartnerProfilePictures(partnerProfilePicturesList);
await commitPartnerAvatars(partnerAvatarList);

// Calculate total rewards from devpool issues
const { rewards, tasks } = await calculateStatistics(await getRepositoryIssues(DEVPOOL_OWNER_NAME, DEVPOOL_REPO_NAME));
Expand Down

0 comments on commit 502c2d5

Please sign in to comment.