Skip to content

Commit 6d397dd

Browse files
committed
Make authenticated requests
1 parent b3849a9 commit 6d397dd

File tree

1 file changed

+2
-2
lines changed
  • repo-scripts/changelog-generator

1 file changed

+2
-2
lines changed

repo-scripts/changelog-generator/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ async function getFixedIssueLink(
9393
repo: string
9494
): Promise<string> {
9595
const { body }: { body: string } = await fetch(
96-
`https://api.github.com/repos/${repo}/pulls/${prNumber}`,
96+
`https://api.github.com/repos/${repo}/pulls/${prNumber}?access_token=${process.env.GITHUB_TOKEN}`,
9797
{
9898
method: 'GET'
9999
}
100100
).then(data => data.json());
101+
console.log(body, repo, prNumber);
101102

102103
const match = fixedIssueRegex.exec(body);
103104
if (!match) {
104105
return '';
105106
}
106-
107107
const issueNumber = match[3];
108108
return `Fixed [issue #${issueNumber}](https://github.com/firebase/firebase-js-sdk/issues/${issueNumber})`;
109109
}

0 commit comments

Comments
 (0)