Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node/.devcontainer/base.Dockerfile
# [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
ARG VARIANT=20-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
ARG VARIANT=24-trixie
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}

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

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

# Intall aws cli
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
# Install sam cli
RUN pip install aws-sam-cli
# Install sam cli (use pipx because Debian Trixie's Python is PEP 668 externally-managed)
RUN PIPX_HOME=/usr/local/pipx PIPX_BIN_DIR=/usr/local/bin pipx install aws-sam-cli
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": { "VARIANT": "20-bullseye" }
"args": { "VARIANT": "24-trixie" }
},

"settings": {},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
node-version: 24
check-latest: true
cache: npm
- run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
node-version: 24
check-latest: true
cache: npm
- run: npm ci
Expand Down
12 changes: 11 additions & 1 deletion handler.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
const {
createLambdaFunction,
createProbot,
ProbotOctokit,
} = require("@probot/adapter-aws-lambda-serverless");

const appFn = require("./");

const Octokit = ProbotOctokit.defaults({
userAgent: "emergency-pull-request-probot-app",
request: {
headers: {
"X-GitHub-Api-Version": "2026-03-10",
},
},
});

module.exports.webhooks = createLambdaFunction(appFn, {
probot: createProbot(),
probot: createProbot({ overrides: { Octokit } }),
});
2 changes: 1 addition & 1 deletion template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Resources:
Description: Basic Auth Funtion
CodeUri: .
Handler: handler.webhooks
Runtime: nodejs20.x
Runtime: nodejs24.x
MemorySize: 256
Timeout: 20
Events:
Expand Down
5 changes: 5 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,11 @@ test.before.each(() => {
Octokit: ProbotOctokit.defaults({
throttle: { enabled: false },
retry: { enabled: false },
request: {
headers: {
"X-GitHub-Api-Version": "2026-03-10",
},
},
}),
});
probot.load(app);
Expand Down
Loading