Skip to content

Commit 9e7b76a

Browse files
authored
chore(NODE-6170): update release please owner (#690)
1 parent b0f9264 commit 9e7b76a

File tree

5 files changed

+14
-129
lines changed

5 files changed

+14
-129
lines changed

.github/scripts/highlights.mjs

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
// @ts-check
22
import * as process from 'node:process';
3-
import { Octokit } from '@octokit/core';
43
import { output } from './util.mjs';
54

65
const {
76
GITHUB_TOKEN = '',
87
PR_LIST = '',
9-
owner = 'mongodb',
10-
repo = 'js-bson'
8+
REPOSITORY = ''
119
} = process.env;
1210
if (GITHUB_TOKEN === '') throw new Error('GITHUB_TOKEN cannot be empty');
11+
if (REPOSITORY === '') throw new Error('REPOSITORY cannot be empty')
1312

14-
const octokit = new Octokit({
15-
auth: GITHUB_TOKEN,
16-
log: {
17-
debug: msg => console.error('Octokit.debug', msg),
18-
info: msg => console.error('Octokit.info', msg),
19-
warn: msg => console.error('Octokit.warn', msg),
20-
error: msg => console.error('Octokit.error', msg)
13+
const API_REQ_INFO = {
14+
headers: {
15+
Accept: 'application/vnd.github.v3+json',
16+
'X-GitHub-Api-Version': '2022-11-28',
17+
Authorization: `Bearer ${GITHUB_TOKEN}`
2118
}
22-
});
19+
}
2320

2421
const prs = PR_LIST.split(',').map(pr => {
2522
const prNum = Number(pr);
@@ -35,13 +32,10 @@ async function getPullRequestContent(pull_number) {
3532

3633
let body;
3734
try {
38-
const res = await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {
39-
owner,
40-
repo,
41-
pull_number,
42-
headers: { 'X-GitHub-Api-Version': '2022-11-28' }
43-
});
44-
body = res.data.body;
35+
const response = await fetch(new URL(`https://api.github.com/repos/${REPOSITORY}/pulls/${pull_number}`), API_REQ_INFO);
36+
if (!response.ok) throw new Error(await response.text());
37+
const pr = await response.json();
38+
body = pr.body;
4539
} catch (error) {
4640
console.log(`Could not get PR ${pull_number}, skipping. ${error.status}`);
4741
return '';

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
release_created: ${{ steps.release.outputs.release_created }}
1818
steps:
1919
- id: release
20-
uses: google-github-actions/release-please-action@v4
20+
uses: googleapis/release-please-action@v4
2121

2222
compress_sign_and_upload:
2323
needs: [release_please]

.github/workflows/release_notes.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
env:
6565
GITHUB_TOKEN: ${{ github.token }}
6666
PR_LIST: ${{ steps.pr_list.outputs.pr_list }}
67+
REPOSITORY: ${{ github.repository }}
6768

6869
# The combined output is available
6970
- id: release_notes

package-lock.json

Lines changed: 0 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"devDependencies": {
2929
"@istanbuljs/nyc-config-typescript": "^1.0.2",
3030
"@microsoft/api-extractor": "^7.43.1",
31-
"@octokit/core": "^6.1.2",
3231
"@rollup/plugin-node-resolve": "^15.2.3",
3332
"@rollup/plugin-typescript": "^11.1.6",
3433
"@types/chai": "^4.3.14",

0 commit comments

Comments
 (0)