Skip to content

Commit 39dc294

Browse files
committed
comment out
1 parent a8658d7 commit 39dc294

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

.vscode/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/.token.js
1+
# /.token.js

code/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ <h3>GitHub Tracker</h3>
4848
</nav>
4949
</footer>
5050

51-
<script src="./token.js"></script>
51+
<!-- <script src="./token.js"></script> -->
5252
<script src="./script.js"></script>
5353
<script src="./chart.js"></script>
5454
</body>

code/script.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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

88
const USER = 'intehon'
99
const REPOS_URL = `https://api.github.com/users/${USER}/repos`
@@ -13,7 +13,7 @@ const projectsContainer = document.getElementById('projects')
1313
const infoContainer = document.getElementById('info-container')
1414

1515
const 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

2828
const 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

8888
const 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

code/token.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const token = `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`
1+
// const token = `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`

0 commit comments

Comments
 (0)