From cca9d32e4435edb25578451e223781f80309156b Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Mon, 20 May 2024 13:59:08 -0400 Subject: [PATCH] chore(NODE-6170): update release please owner --- .github/scripts/highlights.mjs | 30 +++----- .github/workflows/release.yml | 2 +- .github/workflows/release_notes.yml | 1 + package-lock.json | 109 ---------------------------- package.json | 1 - 5 files changed, 14 insertions(+), 129 deletions(-) diff --git a/.github/scripts/highlights.mjs b/.github/scripts/highlights.mjs index 6df213dced..64363c432c 100644 --- a/.github/scripts/highlights.mjs +++ b/.github/scripts/highlights.mjs @@ -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 = 'node-mongodb-native' + 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); @@ -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 ''; diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b58b4a4419..c161f125c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - id: release - uses: google-github-actions/release-please-action@v4 + uses: googleapis/release-please-action@v4 # If release-please created a release, publish to npm - if: ${{ steps.release.outputs.release_created }} diff --git a/.github/workflows/release_notes.yml b/.github/workflows/release_notes.yml index 3293db7ef3..54b038f531 100644 --- a/.github/workflows/release_notes.yml +++ b/.github/workflows/release_notes.yml @@ -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 diff --git a/package-lock.json b/package-lock.json index 19a7554466..0ca286e94b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,6 @@ "@microsoft/api-extractor": "^7.43.1", "@microsoft/tsdoc-config": "^0.16.2", "@mongodb-js/zstd": "^1.2.0", - "@octokit/core": "^6.1.2", "@types/chai": "^4.3.14", "@types/chai-subset": "^1.3.5", "@types/express": "^4.17.21", @@ -2083,102 +2082,6 @@ "node": ">= 8" } }, - "node_modules/@octokit/auth-token": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.1.tgz", - "integrity": "sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==", - "dev": true, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz", - "integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==", - "dev": true, - "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.0.0", - "@octokit/request": "^9.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.0.0", - "before-after-hook": "^3.0.2", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/endpoint": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz", - "integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==", - "dev": true, - "dependencies": { - "@octokit/types": "^13.0.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.1.tgz", - "integrity": "sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==", - "dev": true, - "dependencies": { - "@octokit/request": "^9.0.0", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/openapi-types": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.1.0.tgz", - "integrity": "sha512-pGUdSP+eEPfZiQHNkZI0U01HLipxncisdJQB4G//OAmfeO8sqTQ9KRa0KF03TUPCziNsoXUrTg4B2Q1EX++T0Q==", - "dev": true - }, - "node_modules/@octokit/request": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.1.tgz", - "integrity": "sha512-pyAguc0p+f+GbQho0uNetNQMmLG1e80WjkIaqqgUkihqUp0boRU6nKItXO4VWnr+nbZiLGEyy4TeKRwqaLvYgw==", - "dev": true, - "dependencies": { - "@octokit/endpoint": "^10.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.1.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/request-error": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.1.tgz", - "integrity": "sha512-1mw1gqT3fR/WFvnoVpY/zUM2o/XkMs/2AszUUG9I69xn0JFLv6PGkPhNk5lbfvROs79wiS0bqiJNxfCZcRJJdg==", - "dev": true, - "dependencies": { - "@octokit/types": "^13.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/types": { - "version": "13.4.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.4.1.tgz", - "integrity": "sha512-Y73oOAzRBAUzR/iRAbGULzpNkX8vaxKCqEtg6K74Ff3w9f5apFnWtE/2nade7dMWWW3bS5Kkd6DJS4HF04xreg==", - "dev": true, - "dependencies": { - "@octokit/openapi-types": "^22.1.0" - } - }, "node_modules/@pkgr/core": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", @@ -3771,12 +3674,6 @@ } ] }, - "node_modules/before-after-hook": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", - "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==", - "dev": true - }, "node_modules/bignumber.js": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", @@ -10422,12 +10319,6 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, - "node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==", - "dev": true - }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", diff --git a/package.json b/package.json index a6d9ce3fa1..efe26cb027 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,6 @@ "@microsoft/api-extractor": "^7.43.1", "@microsoft/tsdoc-config": "^0.16.2", "@mongodb-js/zstd": "^1.2.0", - "@octokit/core": "^6.1.2", "@types/chai": "^4.3.14", "@types/chai-subset": "^1.3.5", "@types/express": "^4.17.21",