chore(deps): update dependency @octokit/rest to v20 (#204)

* chore(deps): update dependency @octokit/rest to v20

* ci: update to node 18

* fmt

* update node engine field

* update ci workflow

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
renovate[bot]
2023-07-13 03:11:31 +03:00
committed by GitHub
parent ff289adad2
commit 5b52bfaa76
9 changed files with 103 additions and 65 deletions

View File

@@ -15,7 +15,7 @@ jobs:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
cache: "pnpm"
- run: pnpm i
- run: pnpm type-check

View File

@@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
cache: 'pnpm'
- run: pnpm i
- run: pnpm type-check

View File

@@ -59,8 +59,8 @@ describe("Tauri Github bot", () => {
expect(body.body).toMatch(
makeUpstreamIssueBody(
upstreamSuccess.issue.html_url,
upstreamSuccess.issue.body
)
upstreamSuccess.issue.body,
),
);
return true;
})
@@ -72,7 +72,7 @@ describe("Tauri Github bot", () => {
(body) => {
expect(body.labels).toMatchObject([UPSTREAM_LABEL]);
return true;
}
},
)
.reply(200);
@@ -110,7 +110,7 @@ describe("Tauri Github bot", () => {
nock("https://api.github.com")
.post(`/repos/tauri-apps/tauri/issues/90/comments`, (body) => {
expect(body.body).toMatch(
makeUpstreamIssueClosedComment(issueClosedUpstreamed.issue.html_url)
makeUpstreamIssueClosedComment(issueClosedUpstreamed.issue.html_url),
);
return true;
})
@@ -127,8 +127,8 @@ describe("Tauri Github bot", () => {
.delete(
`/repos/tauri-apps/tauri/issues/90/labels/${UPSTREAM_LABEL.replace(
":",
"%3A"
).replace(" ", "%20")}`
"%3A",
).replace(" ", "%20")}`,
)
.reply(200);

View File

@@ -19,7 +19,7 @@ describe("Parses issue info correctly from a GitHub url", () => {
let url = "https://github.com/tauri-apps/tauri/issues/165";
const [owner, repo, issue_number, state] = (await getIssueInfoFromUrl(
dummyOctokit,
url
url,
))!;
expect(owner).toBe("tauri-apps");
expect(repo).toBe("tauri");

View File

@@ -22,7 +22,7 @@
"probot": "12.3.1"
},
"devDependencies": {
"@octokit/rest": "19.0.13",
"@octokit/rest": "20.0.1",
"nock": "13.3.1",
"prettier": "3.0.0",
"tsup": "7.1.0",
@@ -30,6 +30,6 @@
"vitest": "0.33.0"
},
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
}
}

134
pnpm-lock.yaml generated
View File

@@ -11,8 +11,8 @@ dependencies:
devDependencies:
'@octokit/rest':
specifier: 19.0.13
version: 19.0.13
specifier: 20.0.1
version: 20.0.1
nock:
specifier: 13.3.1
version: 13.3.1
@@ -533,6 +533,12 @@ packages:
engines: {node: '>= 14'}
dependencies:
'@octokit/types': 9.3.2
dev: false
/@octokit/auth-token@4.0.0:
resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==}
engines: {node: '>= 18'}
dev: true
/@octokit/auth-unauthenticated@3.0.4:
resolution: {integrity: sha512-AT74XGBylcLr4lmUp1s6mjSUgphGdlse21Qjtv5DzpX1YOl5FXKwvNcZWESdhyBbpDT8VkVyLFqa/7a7eqpPNw==}
@@ -556,19 +562,17 @@ packages:
- encoding
dev: false
/@octokit/core@4.2.1:
resolution: {integrity: sha512-tEDxFx8E38zF3gT7sSMDrT1tGumDgsw5yPG6BBh/X+5ClIQfMH/Yqocxz1PnHx6CHyF6pxmovUTOfZAUvQ0Lvw==}
engines: {node: '>= 14'}
/@octokit/core@5.0.0:
resolution: {integrity: sha512-YbAtMWIrbZ9FCXbLwT9wWB8TyLjq9mxpKdgB3dUNxQcIVTf9hJ70gRPwAcqGZdY6WdJPZ0I7jLaaNDCiloGN2A==}
engines: {node: '>= 18'}
dependencies:
'@octokit/auth-token': 3.0.3
'@octokit/graphql': 5.0.5
'@octokit/request': 6.2.3
'@octokit/request-error': 3.0.3
'@octokit/types': 9.3.2
'@octokit/auth-token': 4.0.0
'@octokit/graphql': 7.0.1
'@octokit/request': 8.0.4
'@octokit/request-error': 5.0.0
'@octokit/types': 11.1.0
before-after-hook: 2.2.3
universal-user-agent: 6.0.0
transitivePeerDependencies:
- encoding
dev: true
/@octokit/endpoint@6.0.12:
@@ -586,6 +590,16 @@ packages:
'@octokit/types': 9.3.2
is-plain-object: 5.0.0
universal-user-agent: 6.0.0
dev: false
/@octokit/endpoint@9.0.0:
resolution: {integrity: sha512-szrQhiqJ88gghWY2Htt8MqUDO6++E/EIXqJ2ZEp5ma3uGS46o7LZAzSLt49myB7rT+Hfw5Y6gO3LmOxGzHijAQ==}
engines: {node: '>= 18'}
dependencies:
'@octokit/types': 11.1.0
is-plain-object: 5.0.0
universal-user-agent: 6.0.0
dev: true
/@octokit/graphql@4.8.0:
resolution: {integrity: sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==}
@@ -597,15 +611,13 @@ packages:
- encoding
dev: false
/@octokit/graphql@5.0.5:
resolution: {integrity: sha512-Qwfvh3xdqKtIznjX9lz2D458r7dJPP8l6r4GQkIdWQouZwHQK0mVT88uwiU2bdTU2OtT1uOlKpRciUWldpG0yQ==}
engines: {node: '>= 14'}
/@octokit/graphql@7.0.1:
resolution: {integrity: sha512-T5S3oZ1JOE58gom6MIcrgwZXzTaxRnxBso58xhozxHpOqSTgDS6YNeEUvZ/kRvXgPrRz/KHnZhtb7jUMRi9E6w==}
engines: {node: '>= 18'}
dependencies:
'@octokit/request': 6.2.3
'@octokit/types': 9.3.2
'@octokit/request': 8.0.4
'@octokit/types': 11.1.0
universal-user-agent: 6.0.0
transitivePeerDependencies:
- encoding
dev: true
/@octokit/oauth-authorization-url@5.0.0:
@@ -653,23 +665,23 @@ packages:
'@octokit/types': 6.41.0
dev: false
/@octokit/plugin-paginate-rest@6.1.2(@octokit/core@4.2.1):
resolution: {integrity: sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==}
engines: {node: '>= 14'}
/@octokit/plugin-paginate-rest@8.0.0(@octokit/core@5.0.0):
resolution: {integrity: sha512-2xZ+baZWUg+qudVXnnvXz7qfrTmDeYPCzangBVq/1gXxii/OiS//4shJp9dnCCvj1x+JAm9ji1Egwm1BA47lPQ==}
engines: {node: '>= 18'}
peerDependencies:
'@octokit/core': '>=4'
'@octokit/core': '>=5'
dependencies:
'@octokit/core': 4.2.1
'@octokit/tsconfig': 1.0.2
'@octokit/types': 9.3.2
'@octokit/core': 5.0.0
'@octokit/types': 11.1.0
dev: true
/@octokit/plugin-request-log@1.0.4(@octokit/core@4.2.1):
resolution: {integrity: sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==}
/@octokit/plugin-request-log@4.0.0(@octokit/core@5.0.0):
resolution: {integrity: sha512-2uJI1COtYCq8Z4yNSnM231TgH50bRkheQ9+aH8TnZanB6QilOnx8RMD2qsnamSOXtDj0ilxvevf5fGsBhBBzKA==}
engines: {node: '>= 18'}
peerDependencies:
'@octokit/core': '>=3'
'@octokit/core': '>=5'
dependencies:
'@octokit/core': 4.2.1
'@octokit/core': 5.0.0
dev: true
/@octokit/plugin-rest-endpoint-methods@5.16.2(@octokit/core@3.6.0):
@@ -682,15 +694,14 @@ packages:
deprecation: 2.3.1
dev: false
/@octokit/plugin-rest-endpoint-methods@7.1.2(@octokit/core@4.2.1):
resolution: {integrity: sha512-R0oJ7j6f/AdqPLtB9qRXLO+wjI9pctUn8Ka8UGfGaFCcCv3Otx14CshQ89K4E88pmyYZS8p0rNTiprML/81jig==}
engines: {node: '>= 14'}
/@octokit/plugin-rest-endpoint-methods@9.0.0(@octokit/core@5.0.0):
resolution: {integrity: sha512-KquMF/VB1IkKNiVnzJKspY5mFgGyLd7HzdJfVEGTJFzqu9BRFNWt+nwTCMuUiWc72gLQhRWYubTwOkQj+w/1PA==}
engines: {node: '>= 18'}
peerDependencies:
'@octokit/core': '>=3'
'@octokit/core': '>=5'
dependencies:
'@octokit/core': 4.2.1
'@octokit/types': 9.3.2
deprecation: 2.3.1
'@octokit/core': 5.0.0
'@octokit/types': 11.1.0
dev: true
/@octokit/plugin-retry@3.0.9:
@@ -725,6 +736,16 @@ packages:
'@octokit/types': 9.3.2
deprecation: 2.3.1
once: 1.4.0
dev: false
/@octokit/request-error@5.0.0:
resolution: {integrity: sha512-1ue0DH0Lif5iEqT52+Rf/hf0RmGO9NWFjrzmrkArpG9trFfDM/efx00BJHdLGuro4BR/gECxCU2Twf5OKrRFsQ==}
engines: {node: '>= 18'}
dependencies:
'@octokit/types': 11.1.0
deprecation: 2.3.1
once: 1.4.0
dev: true
/@octokit/request@5.6.3:
resolution: {integrity: sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==}
@@ -751,21 +772,33 @@ packages:
universal-user-agent: 6.0.0
transitivePeerDependencies:
- encoding
dev: false
/@octokit/rest@19.0.13:
resolution: {integrity: sha512-/EzVox5V9gYGdbAI+ovYj3nXQT1TtTHRT+0eZPcuC05UFSWO3mdO9UY1C0i2eLF9Un1ONJkAk+IEtYGAC+TahA==}
engines: {node: '>= 14'}
/@octokit/request@8.0.4:
resolution: {integrity: sha512-YZ1XeDRil4ejHKoBP8BgROgP4auOH5A9lLZH96l39GKKEmsKOccQxKP5M7m+Punblg1bFw8LrdeKIDwIzQ8afA==}
engines: {node: '>= 18'}
dependencies:
'@octokit/core': 4.2.1
'@octokit/plugin-paginate-rest': 6.1.2(@octokit/core@4.2.1)
'@octokit/plugin-request-log': 1.0.4(@octokit/core@4.2.1)
'@octokit/plugin-rest-endpoint-methods': 7.1.2(@octokit/core@4.2.1)
transitivePeerDependencies:
- encoding
'@octokit/endpoint': 9.0.0
'@octokit/request-error': 5.0.0
'@octokit/types': 11.1.0
is-plain-object: 5.0.0
universal-user-agent: 6.0.0
dev: true
/@octokit/tsconfig@1.0.2:
resolution: {integrity: sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==}
/@octokit/rest@20.0.1:
resolution: {integrity: sha512-wROV21RwHQIMNb2Dgd4+pY+dVy1Dwmp85pBrgr6YRRDYRBu9Gb+D73f4Bl2EukZSj5hInq2Tui9o7gAQpc2k2Q==}
engines: {node: '>= 18'}
dependencies:
'@octokit/core': 5.0.0
'@octokit/plugin-paginate-rest': 8.0.0(@octokit/core@5.0.0)
'@octokit/plugin-request-log': 4.0.0(@octokit/core@5.0.0)
'@octokit/plugin-rest-endpoint-methods': 9.0.0(@octokit/core@5.0.0)
dev: true
/@octokit/types@11.1.0:
resolution: {integrity: sha512-Fz0+7GyLm/bHt8fwEqgvRBWwIV1S6wRRyq+V6exRKLVWaKGsuy6H9QFYeBVDV7rK6fO3XwHgQOPxv+cLj2zpXQ==}
dependencies:
'@octokit/openapi-types': 18.0.0
dev: true
/@octokit/types@6.41.0:
@@ -784,6 +817,7 @@ packages:
resolution: {integrity: sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==}
dependencies:
'@octokit/openapi-types': 18.0.0
dev: false
/@octokit/webhooks-methods@2.0.0:
resolution: {integrity: sha512-35cfQ4YWlnZnmZKmIxlGPUPLtbkF8lr/A/1Sk1eC0ddLMwQN06dOuLc+dI3YLQS+T+MoNt3DIQ0NynwgKPilig==}
@@ -2248,6 +2282,7 @@ packages:
optional: true
dependencies:
whatwg-url: 5.0.0
dev: false
/normalize-path@3.0.0:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
@@ -2982,6 +3017,7 @@ packages:
/tr46@0.0.3:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
dev: false
/tr46@1.0.1:
resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==}
@@ -3237,6 +3273,7 @@ packages:
/webidl-conversions@3.0.1:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
dev: false
/webidl-conversions@4.0.2:
resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
@@ -3247,6 +3284,7 @@ packages:
dependencies:
tr46: 0.0.3
webidl-conversions: 3.0.1
dev: false
/whatwg-url@7.1.0:
resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==}

View File

@@ -43,7 +43,7 @@ export default (app: Probot): void => {
const { title, body, html_url, number } = context.payload.issue;
app.log.info(
`Running "/upstream" command from ${repository.owner.login}/${repository.name}#${number} to ${cOwner}/${cRepo} by ${sender.login}.`
`Running "/upstream" command from ${repository.owner.login}/${repository.name}#${number} to ${cOwner}/${cRepo} by ${sender.login}.`,
);
await TAURI_BOT_ACC_OCTOKIT.issues.create({
@@ -60,7 +60,7 @@ export default (app: Probot): void => {
labels: [UPSTREAM_LABEL],
repo: repository.name,
owner: cOwner,
})
}),
);
}
}
@@ -93,7 +93,7 @@ export default (app: Probot): void => {
if (state === "closed") return;
app.log.info(
`Upstream issue ${repository.owner.login}/${repository.name}#${issue.number} has been closed; notifying original issue ${owner}/${repo}#${issue_number} .`
`Upstream issue ${repository.owner.login}/${repository.name}#${issue.number} has been closed; notifying original issue ${owner}/${repo}#${issue_number} .`,
);
// notify original issue that upstream is resolved

View File

@@ -7,7 +7,7 @@ export const UPSTREAM_ISSUE_BODY_PREDICATE =
export const UPSTREAM_ISSUE_BODY_SEPARATOR = "\n\n";
export function makeUpstreamIssueBody(
originalIssueUrl: string,
body: string
body: string,
): string {
return `${UPSTREAM_ISSUE_BODY_PREDICATE} ${originalIssueUrl} ${UPSTREAM_ISSUE_BODY_SEPARATOR}${body}`;
}

View File

@@ -7,7 +7,7 @@ import { TAURI_BOT_ACC_OCTOKIT, TAURI_ORG } from "./constants";
export async function getIssueInfoFromUrl(
octokit: InstanceType<typeof ProbotOctokit>,
url: string
url: string,
): Promise<[string, string, number, string] | undefined> {
const matches = /\.*github\.com\/(.+?)\/(.+?)\/issues\/([0-9]+)$/.exec(url);
if (!matches) return;