File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ const username = 'Kras053'
2+ const API_URL = `https://api.github.com/users/${ username } /repos`
3+
4+ //my repos in GitHub filtered on forks from Technigo
5+ const myRepos = ( ) => {
6+
7+ fetch ( API_URL )
8+ . then ( ( response ) => response . json ( ) )
9+ . then ( ( data ) => {
10+ console . log ( data )
11+
12+ const forkedRepos = data . filter ( repo => repo . fork )
13+ const technigoRepos = data . filter ( repo => repo . name . startsWith ( 'project' ) )
14+ console . log ( forkedRepos )
15+ console . log ( technigoRepos )
16+ } )
17+ }
18+
19+ myRepos ( )
20+
21+
22+
23+
24+ /* later specific repos list
25+ const getPullRequests = (repos) => {
26+ repos.forEach(repo => {
27+ fetch('API_URL')
28+ .then(res => res.json())
29+ .then(data => {
30+ console.log(data)
31+ })
32+
33+ })
34+
35+ }*/
36+
37+ /*
38+
39+ https://api.github.com/repos/Technigo/${reponame}/pulls
40+
41+ */
42+
43+ /*
44+ step 1 worked:
45+ const username = 'Kras053'
46+ const API_URL =`https://api.github.com/users/${username}/repos`
47+
48+ fetch(API_URL)
49+ .then((response) => response.json())
50+ .then((data) => {
51+ console.log('data', data)
52+ })
53+ */
You can’t perform that action at this time.
0 commit comments