1- const options = {
2- method : 'GET' ,
3- headers : {
4- Authorization : `token ${ token } `
5- }
6- }
1+ // const options = {
2+ // method: 'GET',
3+ // headers: {
4+ // Authorization: `token ${token}`
5+ // }
6+ // }
77
88const USER = 'intehon'
99const REPOS_URL = `https://api.github.com/users/${ USER } /repos`
@@ -13,7 +13,7 @@ const projectsContainer = document.getElementById('projects')
1313const infoContainer = document . getElementById ( 'info-container' )
1414
1515const getUserInfo = ( ) => {
16- fetch ( USER_INFO_URL , options )
16+ fetch ( USER_INFO_URL )
1717 . then ( ( response ) => response . json ( ) )
1818 . then ( ( data ) => {
1919 console . log ( 'user data: ' , data )
@@ -26,7 +26,7 @@ const getUserInfo = () => {
2626
2727
2828const fetchRepos = ( ) => {
29- fetch ( REPOS_URL , options )
29+ fetch ( REPOS_URL )
3030 . then ( ( response ) => response . json ( ) )
3131 . then ( ( data ) => {
3232 console . log ( 'my repos: ' , data )
@@ -63,7 +63,7 @@ const fetchPullRequestsArray = (allRepositories) => {
6363 allRepositories . forEach ( ( repo ) => {
6464 const PULL_URL = `https://api.github.com/repos/Technigo/${ repo . name } /pulls?per_page=100`
6565
66- fetch ( PULL_URL , options )
66+ fetch ( PULL_URL )
6767 . then ( ( response ) => response . json ( ) )
6868 . then ( ( data ) => {
6969 const myPullRequests = data . find ( ( pull ) => pull . user . login === repo . owner . login
@@ -86,7 +86,7 @@ const fetchPullRequestsArray = (allRepositories) => {
8686}
8787
8888const fetchCommits = ( myCommitsUrl , myRepoName ) => {
89- fetch ( myCommitsUrl , options )
89+ fetch ( myCommitsUrl )
9090 . then ( ( res ) => res . json ( ) )
9191 . then ( ( data ) => {
9292 document . getElementById ( `commit-${ myRepoName } ` ) . innerHTML += data . length
0 commit comments