Skip to content

Commit c95bc55

Browse files
authored
Node24 (#287)
* node24 * GitHub API version 2026-03-10
1 parent 184ba13 commit c95bc55

7 files changed

Lines changed: 25 additions & 10 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node/.devcontainer/base.Dockerfile
22
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
3-
ARG VARIANT=20-bullseye
4-
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
3+
ARG VARIANT=24-trixie
4+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}
55

66
# [Optional] Uncomment this section to install additional OS packages.
77
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
8-
&& apt-get -y install --no-install-recommends python pip
8+
&& apt-get -y install --no-install-recommends python3 python3-pip python-is-python3 pipx
99

1010
# [Optional] Uncomment if you want to install an additional version of node using nvm
1111
# ARG EXTRA_NODE_VERSION=10
@@ -16,5 +16,5 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
1616

1717
# Intall aws cli
1818
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
19-
# Install sam cli
20-
RUN pip install aws-sam-cli
19+
# Install sam cli (use pipx because Debian Trixie's Python is PEP 668 externally-managed)
20+
RUN PIPX_HOME=/usr/local/pipx PIPX_BIN_DIR=/usr/local/bin pipx install aws-sam-cli

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
88
// Append -bullseye or -buster to pin to an OS version.
99
// Use -bullseye variants on local arm64/Apple Silicon.
10-
"args": { "VARIANT": "20-bullseye" }
10+
"args": { "VARIANT": "24-trixie" }
1111
},
1212

1313
"settings": {},

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v6
2222
- uses: actions/setup-node@v6
2323
with:
24-
node-version: 20
24+
node-version: 24
2525
check-latest: true
2626
cache: npm
2727
- run: npm ci

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v6
1616
- uses: actions/setup-node@v6
1717
with:
18-
node-version: 20
18+
node-version: 24
1919
check-latest: true
2020
cache: npm
2121
- run: npm ci

handler.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
const {
22
createLambdaFunction,
33
createProbot,
4+
ProbotOctokit,
45
} = require("@probot/adapter-aws-lambda-serverless");
56

67
const appFn = require("./");
78

9+
const Octokit = ProbotOctokit.defaults({
10+
userAgent: "emergency-pull-request-probot-app",
11+
request: {
12+
headers: {
13+
"X-GitHub-Api-Version": "2026-03-10",
14+
},
15+
},
16+
});
17+
818
module.exports.webhooks = createLambdaFunction(appFn, {
9-
probot: createProbot(),
19+
probot: createProbot({ overrides: { Octokit } }),
1020
});

template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Resources:
8787
Description: Basic Auth Funtion
8888
CodeUri: .
8989
Handler: handler.webhooks
90-
Runtime: nodejs20.x
90+
Runtime: nodejs24.x
9191
MemorySize: 256
9292
Timeout: 20
9393
Events:

test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ test.before.each(() => {
328328
Octokit: ProbotOctokit.defaults({
329329
throttle: { enabled: false },
330330
retry: { enabled: false },
331+
request: {
332+
headers: {
333+
"X-GitHub-Api-Version": "2026-03-10",
334+
},
335+
},
331336
}),
332337
});
333338
probot.load(app);

0 commit comments

Comments
 (0)