Skip to content
This repository was archived by the owner on Aug 17, 2024. It is now read-only.

Commit 1fe0291

Browse files
authored
Merge pull request #1 from CodeYourFuture/update-readme
update readme
2 parents 8e50a72 + 99e4a6b commit 1fe0291

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ The documentation for the `repos` endpoint is available on: [https://developer.g
2626
**When** I am presented a list of my Repos
2727
**Then** each repo should have a link to go to the Github page
2828

29+
> **Hint:** If you're unsure about how to create a link from JavaScript, then check [this StackOverflow post](https://stackoverflow.com/questions/37472635/javascript-dom-add-href-and-a-link) that has the answer.
30+
31+
2932
### Requirement 3: Display the number of Repos
3033
**Given** I am on the Resume site
3134
**When** I click on `My Github` link
@@ -47,6 +50,12 @@ GET [https://api.github.com/repos/codeyourfuture/js-exercises/pulls](https://api
4750

4851
For the below 3 tasks, you'll need to work in: `pull-requests.html` & `pull-requests.js`
4952

53+
> First, you need to link the `html` and `JavaScript` together. Go to the `html` page and add a script tag `<script src="../js/pull-requests.js"></script>`
54+
55+
Where do I write the code for Part 2 requirements?
56+
57+
> The file `pull-requests.js` (that you just linked) is where you need to write the JavaScript to peform these requirements.
58+
5059
### Requirement 4: Show ALL Pull Requests
5160
**Given** I am on the Resume site
5261
**When** I click on `Pull Requests` link
@@ -67,16 +76,22 @@ Add a `Search input` on the `My Pull Requests` page. This allows the user to ent
6776

6877
![task 6 demo](./homework_assets/task6demo.png)
6978

79+
> **Hint:** This code below listens to `keyup` event (The keyup event is fired when a key is released) and gets the last value from `event` parameter
80+
```javascript
81+
// input is a DOM element we already have using "querySelector"
82+
input.addEventListener('keyup', function(event) {
83+
const value = event.target.value
84+
console.log(value)
85+
// "value" will be the last value of the input field, and will be updated everytime the user types a new letter
86+
})
87+
88+
```
7089
For the above requirements, you need to use the API:
7190

7291
> GET [https://api.github.com/repos/codeyourfuture/js-exercises/pulls](https://api.github.com/repos/codeyourfuture/js-exercises/pulls)
7392
7493
> hint: This request lists all the pull requests against js-exercises. How can you show only the ones that related to your Github username (How can you _filter_ the list).
7594
76-
Where do I write the code for Part 2 requirements?
77-
78-
> The file `pull-requests.js` is where you need to write the JavaScript to peform these requirements.
79-
8095
## Part 3: Update My Github Page to show other Github user's repos
8196

8297
### Requirement 7: Display someone else's repos in My Github

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,6 @@ gulp.task('browserSync', function() {
133133
// Dev task
134134
gulp.task('dev', ['css', 'js', 'browserSync'], function() {
135135
gulp.watch('./scss/*.scss', ['css']);
136-
gulp.watch('./js/*.js', ['js']);
136+
gulp.watch('./js/*.js', browserSync.reload)
137137
gulp.watch('./*.html', browserSync.reload);
138138
});

js/my-github.min.js

Whitespace-only changes.

js/pull-requests.min.js

Whitespace-only changes.

0 commit comments

Comments
 (0)