Skip to content

Commit 3ba8f22

Browse files
committed
chore: merge upstream main into push-tags
2 parents bd63700 + b937878 commit 3ba8f22

250 files changed

Lines changed: 36092 additions & 9987 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
"react/prop-types": "off",
5050
"require-jsdoc": "off",
5151
"no-async-promise-executor": "off",
52-
"@typescript-eslint/no-explicit-any": "off", // temporary until TS refactor is complete
53-
"@typescript-eslint/no-unused-vars": "off", // temporary until TS refactor is complete
54-
"@typescript-eslint/no-require-imports": "off", // prevents error on old "require" imports
55-
"@typescript-eslint/no-unused-expressions": "off" // prevents error on test "expect" expressions
52+
"@typescript-eslint/no-explicit-any": "off",
53+
"@typescript-eslint/no-unused-vars": "off",
54+
"@typescript-eslint/no-require-imports": "off",
55+
"@typescript-eslint/no-unused-expressions": "off"
5656
},
5757
"settings": {
5858
"react": {

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default — maintainers own everything
2+
* @finos/git-proxy-maintainers

.github/workflows/ci.yml

Lines changed: 103 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,78 +13,164 @@ permissions:
1313
pull-requests: write
1414

1515
jobs:
16-
build:
16+
# Ubuntu build with MongoDB matrix (9 combinations: 3 Node × 3 MongoDB)
17+
build-ubuntu:
1718
runs-on: ubuntu-latest
1819

1920
strategy:
21+
fail-fast: false
2022
matrix:
21-
node-version: [20.x]
22-
mongodb-version: [4.4]
23+
node-version: [20.x, 22.x, 24.x]
24+
mongodb-version: ['6.0', '7.0', '8.0']
2325

2426
steps:
2527
- name: Harden Runner
26-
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
28+
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
2729
with:
2830
egress-policy: audit
2931

30-
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3133
with:
3234
fetch-depth: 0
3335

3436
- name: Use Node.js ${{ matrix.node-version }}
35-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
37+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3638
with:
3739
node-version: ${{ matrix.node-version }}
3840

3941
- name: Start MongoDB
40-
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
42+
uses: supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 # 1.12.1
4143
with:
4244
mongodb-version: ${{ matrix.mongodb-version }}
4345

4446
- name: Install dependencies
45-
run: npm i
47+
run: npm ci
4648

4749
# for now only check the types of the server
4850
# tsconfig isn't quite set up right to respect what vite accepts
4951
# for the frontend code
5052
- name: Check Types (Server)
5153
run: npm run check-types:server
5254

55+
- name: Build TypeScript
56+
run: npm run build-ts
57+
5358
- name: Test
5459
id: test
5560
run: |
5661
npm run test-coverage-ci
5762
npm run test-coverage-ci --workspaces --if-present
5863
64+
- name: MongoDB Integration Tests
65+
env:
66+
RUN_MONGO_TESTS: 'true'
67+
GIT_PROXY_MONGO_CONNECTION_STRING: mongodb://localhost:27017/git-proxy-test
68+
run: npm run test:integration
69+
5970
- name: Upload test coverage report
60-
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
71+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
6172
with:
6273
files: ./coverage/lcov.info
6374
token: ${{ secrets.CODECOV_TOKEN }}
64-
# - name: Exit if coverage condition not met
65-
# if: ${{ steps.test.outputs.exit_code }} != 0
66-
# run: exit ${{ steps.test.outputs.exit_code }}
6775

6876
- name: Build frontend
6977
run: npm run build-ui
7078

7179
- name: Save build folder
7280
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
7381
with:
74-
name: build
82+
name: build-ubuntu-node-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
7583
if-no-files-found: error
7684
path: build
7785

7886
- name: Download the build folders
79-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
87+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
8088
with:
81-
name: build
89+
name: build-ubuntu-node-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
8290
path: build
8391

8492
- name: Run cypress test
85-
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
93+
uses: cypress-io/github-action@f790eee7a50d9505912f50c2095510be7de06aa7 # v6.10.9
8694
with:
8795
start: npm start &
8896
wait-on: 'http://localhost:3000'
8997
wait-on-timeout: 120
90-
run: npm run cypress:run
98+
command: npm run cypress:run
99+
100+
# Windows build - single combination for development support
101+
build-windows:
102+
runs-on: windows-latest
103+
104+
steps:
105+
- name: Harden Runner
106+
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
107+
with:
108+
egress-policy: audit
109+
110+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
111+
with:
112+
fetch-depth: 0
113+
114+
- name: Use Node.js 24.x
115+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
116+
with:
117+
node-version: 24.x
118+
119+
- name: Enable Windows Developer Mode
120+
shell: powershell
121+
run: |
122+
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
123+
124+
- name: Install dependencies
125+
run: npm ci
126+
127+
- name: Check Types (Server)
128+
run: npm run check-types:server
129+
130+
- name: Build TypeScript
131+
run: npm run build-ts
132+
133+
- name: Test
134+
id: test
135+
shell: bash
136+
run: |
137+
npm run test-coverage-ci
138+
npm run test-coverage-ci --workspaces --if-present
139+
140+
- name: Build frontend
141+
run: npm run build-ui
142+
143+
# Execute a final job to collect the results and report a single check status
144+
results:
145+
if: ${{ always() }}
146+
runs-on: ubuntu-latest
147+
name: build result
148+
needs: [build-ubuntu, build-windows]
149+
steps:
150+
- name: Check build results
151+
run: |
152+
ubuntu_result="${{ needs.build-ubuntu.result }}"
153+
windows_result="${{ needs.build-windows.result }}"
154+
if [[ ($ubuntu_result == "success" || $ubuntu_result == "skipped") && ($windows_result == "success" || $windows_result == "skipped") ]]; then
155+
echo "### ✅ All builds passed" >> $GITHUB_STEP_SUMMARY
156+
exit 0
157+
else
158+
echo "### ❌ Some builds failed" >> $GITHUB_STEP_SUMMARY
159+
echo "- Ubuntu: $ubuntu_result" >> $GITHUB_STEP_SUMMARY
160+
echo "- Windows: $windows_result" >> $GITHUB_STEP_SUMMARY
161+
exit 1
162+
fi
163+
164+
- name: Parse failed matrix jobs
165+
if: needs.build-ubuntu.result == 'failure' || needs.build-windows.result == 'failure'
166+
run: |
167+
echo "## Failed Matrix Combinations" >> $GITHUB_STEP_SUMMARY
168+
echo "" >> $GITHUB_STEP_SUMMARY
169+
echo "| OS | Node Version | MongoDB Version | Status |" >> $GITHUB_STEP_SUMMARY
170+
echo "|----|--------------|-----------------|--------|" >> $GITHUB_STEP_SUMMARY
171+
172+
# Since we can't directly get individual matrix job statuses,
173+
# we'll note that the build job failed
174+
echo "| Multiple | Multiple | Multiple | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
175+
echo "" >> $GITHUB_STEP_SUMMARY
176+
echo "⚠️ Check the [build job logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details on which specific matrix combinations failed." >> $GITHUB_STEP_SUMMARY

.github/workflows/codeql.yml

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
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-
#
121
name: 'CodeQL'
132

143
on:
@@ -25,67 +14,34 @@ permissions:
2514
jobs:
2615
analyze:
2716
name: Analyze
28-
# Runner size impacts CodeQL analysis time. To learn more, please see:
29-
# - https://gh.io/recommended-hardware-resources-for-running-codeql
30-
# - https://gh.io/supported-runners-and-hardware-resources
31-
# - https://gh.io/using-larger-runners
32-
# Consider using larger runners for possible analysis time improvements.
3317
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
3418
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
3519
permissions:
36-
# required for all workflows
3720
security-events: write
3821

39-
# only required for workflows in private repositories
40-
actions: read
41-
contents: read
42-
4322
strategy:
4423
fail-fast: false
4524
matrix:
4625
language: ['javascript-typescript']
47-
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
48-
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
49-
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
50-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
5126

5227
steps:
5328
- name: Harden Runner
54-
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2
29+
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2
5530
with:
5631
egress-policy: audit
5732

5833
- name: Checkout repository
59-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
34+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # ratchet:actions/checkout@v6
6035

61-
# Initializes the CodeQL tools for scanning.
6236
- name: Initialize CodeQL
63-
uses: github/codeql-action/init@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # v3
37+
uses: github/codeql-action/init@f985be5b50bd175586d44aac9ac52926adf12893 # ratchet:github/codeql-action/init@v4
6438
with:
6539
languages: ${{ matrix.language }}
66-
# If you wish to specify custom queries, you can do so here or in a config file.
67-
# By default, queries listed here will override any specified in a config file.
68-
# Prefix the list here with "+" to use these queries and those in the config file.
69-
70-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
71-
# queries: security-extended,security-and-quality
7240

73-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
74-
# If this step fails, then you should remove it and run the build manually (see below)
7541
- name: Autobuild
76-
uses: github/codeql-action/autobuild@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # v3
77-
78-
# ℹ️ Command-line programs to run using the OS shell.
79-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
80-
81-
# If the Autobuild fails above, remove it and uncomment the following three lines.
82-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
83-
84-
# - run: |
85-
# echo "Run, Build Application using script"
86-
# ./location_of_script_within_repo/buildscript.sh
42+
uses: github/codeql-action/autobuild@f985be5b50bd175586d44aac9ac52926adf12893 # ratchet:github/codeql-action/autobuild@v4
8743

8844
- name: Perform CodeQL Analysis
89-
uses: github/codeql-action/analyze@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # v3
45+
uses: github/codeql-action/analyze@f985be5b50bd175586d44aac9ac52926adf12893 # ratchet:github/codeql-action/analyze@v4
9046
with:
9147
category: '/language:${{matrix.language}}'

.github/workflows/dependency-review.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Harden Runner
13-
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2
13+
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2
1414
with:
1515
egress-policy: audit
1616

1717
- name: 'Checkout Repository'
18-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
18+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1919
- name: Dependency Review
20-
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4
20+
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4
2121
with:
2222
comment-summary-in-pr: always
2323
fail-on-severity: high
24-
allow-licenses: MIT, MIT-0, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, OFL-1.1, Zlib
24+
allow-licenses: MIT, MIT-0, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, OFL-1.1, Zlib, BlueOak-1.0.0, Ubuntu-font-1.0
2525
fail-on-scopes: development, runtime
2626
allow-dependencies-licenses: 'pkg:npm/caniuse-lite'
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Publish Docker Image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
docker-build-publish:
11+
name: Build and Publish Docker Image
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
17+
18+
- name: Checkout Repository
19+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
20+
21+
- name: Log in to Docker Hub
22+
if: github.repository == 'finos/git-proxy'
23+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
24+
with:
25+
username: finos
26+
password: ${{ secrets.DOCKER_PASSWORD }}
27+
28+
- name: Set Docker Image Tag
29+
id: tags
30+
run: |
31+
if [ "${{ github.event_name }}" = "release" ]; then
32+
echo "tags=finos/git-proxy:${{ github.ref_name }},finos/git-proxy:latest" >> $GITHUB_OUTPUT
33+
else
34+
echo "tags=finos/git-proxy:main" >> $GITHUB_OUTPUT
35+
fi
36+
37+
- name: Build and Publish Docker Image
38+
if: github.repository == 'finos/git-proxy'
39+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
40+
with:
41+
context: .
42+
file: Dockerfile
43+
push: true
44+
tags: ${{ steps.tags.outputs.tags }}
45+
provenance: true

0 commit comments

Comments
 (0)