Skip to content

Commit

Permalink
chore(NODE-6170): update release please owner (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken authored Jun 4, 2024
1 parent b0f9264 commit 9e7b76a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 129 deletions.
30 changes: 12 additions & 18 deletions .github/scripts/highlights.mjs
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
// @ts-check
import * as process from 'node:process';
import { Octokit } from '@octokit/core';
import { output } from './util.mjs';

const {
GITHUB_TOKEN = '',
PR_LIST = '',
owner = 'mongodb',
repo = 'js-bson'
REPOSITORY = ''
} = process.env;
if (GITHUB_TOKEN === '') throw new Error('GITHUB_TOKEN cannot be empty');
if (REPOSITORY === '') throw new Error('REPOSITORY cannot be empty')

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

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

let body;
try {
const res = await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {
owner,
repo,
pull_number,
headers: { 'X-GitHub-Api-Version': '2022-11-28' }
});
body = res.data.body;
const response = await fetch(new URL(`https://api.github.com/repos/${REPOSITORY}/pulls/${pull_number}`), API_REQ_INFO);
if (!response.ok) throw new Error(await response.text());
const pr = await response.json();
body = pr.body;
} catch (error) {
console.log(`Could not get PR ${pull_number}, skipping. ${error.status}`);
return '';
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- id: release
uses: google-github-actions/release-please-action@v4
uses: googleapis/release-please-action@v4

compress_sign_and_upload:
needs: [release_please]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
PR_LIST: ${{ steps.pr_list.outputs.pr_list }}
REPOSITORY: ${{ github.repository }}

# The combined output is available
- id: release_notes
Expand Down
109 changes: 0 additions & 109 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@microsoft/api-extractor": "^7.43.1",
"@octokit/core": "^6.1.2",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@types/chai": "^4.3.14",
Expand Down

0 comments on commit 9e7b76a

Please sign in to comment.