Skip to content

Commit e514b4d

Browse files
removing repository branch field
1 parent 5ae66e4 commit e514b4d

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

src/helpers/generateMemberEndpoint.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,12 @@ async function generateMemberEndpoint(githubMemberData) {
1111
avatar_url_small: "https://avatars.githubusercontent.com/u/" + githubMemberData.id + "?s=64&v=4",
1212
avatar_url_medium: "https://avatars.githubusercontent.com/u/" + githubMemberData.id + "?s=128&v=4",
1313
github_url: "https://github.com/" + githubMemberData.login,
14-
categories: [],
15-
repository_branch_name: "main",
14+
categories: []
1615
};
1716
let data = await getRemoteFileData(
1817
`https://raw.githubusercontent.com/${githubMemberData.login}/${githubMemberData.login}/main/cucoders_data/profile-data.json`,
1918
"json"
2019
);
21-
// geting data from master brach in case not using main as default
22-
if (!data) {
23-
data = await getRemoteFileData(
24-
`https://raw.githubusercontent.com/${githubMemberData.login}/${githubMemberData.login}/master/cucoders_data/profile-data.json`,
25-
"json"
26-
);
27-
}
2820

2921
if (data) {
3022
if (data.name) {
@@ -41,7 +33,6 @@ async function generateMemberEndpoint(githubMemberData) {
4133
profileData.categories = data.categories;
4234
profileData.telegram_username = data.telegram_username;
4335
profileData.linkedin_username = data.linkedin_username;
44-
profileData.repository_branch_name = data.repository_branch_name;
4536
} else {
4637
profileData = await getGitHubUserData(profileData);
4738
}

0 commit comments

Comments
 (0)