Skip to content

Commit e42705a

Browse files
authored
Merge branch 'main-enterprise' into feat/github-action-mode-pr-comments
2 parents 962e981 + 2f2229d commit e42705a

19 files changed

Lines changed: 3457 additions & 3252 deletions

.devcontainer/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node/.devcontainer/base.Dockerfile
2-
# [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-bookworm
2+
# [Choice] Node.js version/variant (use -bookworm variants on local arm64/Apple Silicon): e.g. 22-bookworm, 20-bookworm, 18-bookworm
3+
ARG VARIANT=22-bookworm
44
FROM mcr.microsoft.com/devcontainers/javascript-node:1-${VARIANT}
55

66
# [Optional] Uncomment this section to install additional OS packages.
@@ -23,7 +23,10 @@ RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "aws
2323
rm -rf ./aws && \
2424
rm awscliv2.zip
2525
# Install sam cli
26-
RUN curl -L "https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-$(dpkg --print-architecture).zip" -o "aws-sam-cli.zip" && \
26+
RUN ARCH_RAW=$(uname -m) && \
27+
ARCH=$ARCH_RAW && \
28+
if [ "$ARCH_RAW" = "aarch64" ]; then ARCH="arm64"; fi && \
29+
curl -L "https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-${ARCH}.zip" -o "aws-sam-cli.zip" && \
2730
unzip aws-sam-cli.zip -d sam-installation && \
2831
sudo ./sam-installation/install && \
2932
rm -rf ./sam-installation && \

.devcontainer/devcontainer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"name": "Node.js",
55
"build": {
66
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
8-
// Append -bullseye or -buster to pin to an OS version.
9-
// Use -bullseye variants on local arm64/Apple Silicon.
10-
"args": { "VARIANT": "20-bookworm" }
7+
// Update 'VARIANT' to pick a Node version, e.g. 22, 20, 18.
8+
// Append -bookworm or -bullseye to pin to an OS version.
9+
// Use -bookworm variants on local arm64/Apple Silicon.
10+
"args": { "VARIANT": "22-bookworm" }
1111
},
1212

1313
"settings": {},
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
workflow_dispatch:
16+
push:
17+
branches: [ "main-enterprise" ]
18+
pull_request:
19+
branches: [ "main-enterprise" ]
20+
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: actions
47+
build-mode: none
48+
- language: javascript-typescript
49+
build-mode: none
50+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
51+
# Use `c-cpp` to analyze code written in C, C++ or both
52+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
58+
steps:
59+
- name: 'Checkout repository'
60+
uses: actions/checkout@v4
61+
# Initializes the CodeQL tools for scanning.
62+
- name: Initialize CodeQL
63+
uses: github/codeql-action/init@v4
64+
with:
65+
languages: ${{ matrix.language }}
66+
build-mode: ${{ matrix.build-mode }}
67+
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v4
71+
with:
72+
category: "/language:${{matrix.language}}"

.github/workflows/create-pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Setup node
4747
uses: actions/setup-node@v6
4848
with:
49-
node-version: 16.x
49+
node-version: 22.x
5050
cache: 'npm'
5151
- run: npm install
5252
- name: Set up Docker Buildx

.github/workflows/create-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup node
2525
uses: actions/setup-node@v6
2626
with:
27-
node-version: 16.x
27+
node-version: 22.x
2828
cache: "npm"
2929
- run: npm install
3030
- name: Set up Docker Buildx

.github/workflows/node-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111

1212
jobs:
1313
test:
14-
if: ${{ github.actor != 'dependabot'}}
14+
if: ${{ github.actor != 'dependabot[bot]'}}
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v6
@@ -25,5 +25,5 @@ jobs:
2525
strategy:
2626
matrix:
2727
node-version:
28-
- 18
29-
- 20
28+
- 22
29+
- 24

.github/workflows/rc-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Use Node.js
2828
uses: actions/setup-node@v6
2929
with:
30-
node-version: 16.x
30+
node-version: 22.x
3131
cache: npm
3232
- run: npm ci
3333
- run: npm run build --if-present

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20
1+
v22

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine
1+
FROM node:22-alpine
22
WORKDIR /opt/safe-settings
33
ENV NODE_ENV production
44
## Set the Labels

helm/safe-settings/README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,15 @@ A Helm chart for Kubernetes
99
| affinity | object | `{}` | |
1010
| autoscaling.enabled | bool | `false` | |
1111
| autoscaling.maxReplicas | int | `10` | |
12-
| autoscaling.minReplicas | int | `2` | |
12+
| autoscaling.minReplicas | int | `1` | |
1313
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
14-
| deploymentConfig.configvalidators[0].error | string | `"`Admin cannot be assigned to collaborators`\n"` | |
15-
| deploymentConfig.configvalidators[0].plugin | string | `"collaborators"` | |
16-
| deploymentConfig.configvalidators[0].script | string | `"console.log(`baseConfig ${JSON.stringify(baseconfig)}`)\nreturn baseconfig.permission != 'admin'\n"` | |
17-
| deploymentConfig.overridevalidators[0].error | string | `"`Branch protection required_approving_review_count cannot be overidden to a lower value`\n"` | |
18-
| deploymentConfig.overridevalidators[0].plugin | string | `"branches"` | |
19-
| deploymentConfig.overridevalidators[0].script | string | `"console.log(`baseConfig ${JSON.stringify(baseconfig)}`)\nconsole.log(`overrideConfig ${JSON.stringify(overrideconfig)}`)\nif (baseconfig.protection.required_pull_request_reviews.required_approving_review_count && overrideconfig.protection.required_pull_request_reviews.required_approving_review_count ) {\n return overrideconfig.protection.required_pull_request_reviews.required_approving_review_count >= baseconfig.protection.required_pull_request_reviews.required_approving_review_count\n}\nreturn true\n"` | |
20-
| deploymentConfig.overridevalidators[1].error | string | `"Some error\n"` | |
21-
| deploymentConfig.overridevalidators[1].plugin | string | `"labels"` | |
22-
| deploymentConfig.overridevalidators[1].script | string | `"return true\n"` | |
14+
| deploymentConfig.configvalidators | list | [] | |
15+
| deploymentConfig.overridevalidators | list | [] | |
2316
| deploymentConfig.restrictedRepos.exclude[0] | string | `"^admin$"` | |
2417
| deploymentConfig.restrictedRepos.exclude[1] | string | `"^\\.github$"` | |
2518
| deploymentConfig.restrictedRepos.exclude[2] | string | `"^safe-settings$"` | |
2619
| deploymentConfig.restrictedRepos.exclude[3] | string | `".*-test"` | |
27-
| deploymentConfig.restrictedRepos.include[0] | string | `"^test$"` | |
20+
| deploymentConfig.restrictedRepos.include | null | `null` | |
2821
| env | list | `[]` | |
2922
| envFrom | list | `[]` | |
3023
| extraObjects | list | `[]` | Add dynamic manifests via values. Example: extraObjects: - kind: ConfigMap apiVersion: v1 metadata: name: extra-cm-{{ .Release.Name }} data: | extra.yml: "does-my-install-need-extra-info: true" |
@@ -44,15 +37,15 @@ A Helm chart for Kubernetes
4437
| nodeSelector | object | `{}` | |
4538
| podAnnotations | object | `{}` | |
4639
| podSecurityContext | object | `{}` | |
47-
| replicaCount | int | `2` | |
40+
| replicaCount | int | `1` | |
4841
| resources | object | `{}` | |
4942
| securityContext.allowPrivilegeEscalation | bool | `false` | |
5043
| securityContext.capabilities.drop[0] | string | `"ALL"` | |
5144
| securityContext.privileged | bool | `false` | |
5245
| securityContext.readOnlyRootFilesystem | bool | `true` | |
5346
| securityContext.runAsNonRoot | bool | `true` | |
5447
| securityContext.runAsUser | int | `1000` | |
55-
| service.port | int | `80` | |
48+
| service.port | int | `3000` | |
5649
| service.type | string | `"ClusterIP"` | |
5750
| serviceAccount.annotations | object | `{}` | |
5851
| serviceAccount.automountServiceAccountToken | bool | `false` | |

0 commit comments

Comments
 (0)