Commit 40f5424
committed
refactor(index.ts): updates
- Updates `fetchRecentlyClosedPullRequests` in `index` to use the new
version of `GitHub` that requires creating an instance that is passed in
the auth token.
- Updates `fetchRecentlyClosedPullRequests` to require an `auth_token`
is passed in
- Updates tests for `fetchRecentlyClosedPullRequests` to use different
jest mocking functionality and mock out the implementation of `GitHub`.
Now, instead of passing in a fake module that matches `GitHub` we use
magic jest mocking to create a mocked GitHub import which lets us mock
the constructor.
BREAKING CHANGE: Updates the function `fetchRecentlyClosedPullRequests`
exported from `index.ts` to now take in the auth token. This allows for
more flexibilty in that the auth token no longer **has** to be fetched
from an environment variable named `GITindex to use instance an of a GitHub class1 parent 3f4298f commit 40f5424
3 files changed
+19
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 7 | | |
19 | 8 | | |
20 | 9 | | |
21 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
0 commit comments