Skip to content

Commit 72e9597

Browse files
Merge pull request #457 from hoppscotch/main
Create a new pull request by comparing changes across two branches
2 parents c051a47 + bd5f95b commit 72e9597

File tree

637 files changed

+16140
-9576
lines changed

Some content is hidden

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

637 files changed

+16140
-9576
lines changed

.devcontainer/devcontainer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Hoppscotch",
3+
"image": "mcr.microsoft.com/devcontainers/typescript-node:18",
4+
"forwardPorts": [3000],
5+
"features": {
6+
"ghcr.io/NicoVIII/devcontainer-features/pnpm:1": {}
7+
},
8+
"postCreateCommand": "mv .env.example .env && pnpm i"
9+
}

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ updates:
55
schedule:
66
interval: weekly
77
time: '00:00'
8-
open-pull-requests-limit: 10
8+
open-pull-requests-limit: 0
99
reviewers:
1010
- liyasthomas
Lines changed: 48 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,63 @@
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"
1+
name: "CodeQL analysis"
132

143
on:
154
push:
16-
branches: [ main ]
5+
branches: [main]
176
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: [ main ]
7+
branches: [main]
208
schedule:
21-
- cron: '39 7 * * 2'
9+
# ┌───────────── minute (0 - 59)
10+
# │ ┌───────────── hour (0 - 23)
11+
# │ │ ┌───────────── day of the month (1 - 31)
12+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
13+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
14+
# │ │ │ │ │
15+
# │ │ │ │ │
16+
# │ │ │ │ │
17+
# * * * * *
18+
- cron: '30 1 * * 0'
2219

2320
jobs:
2421
analyze:
2522
name: Analyze
23+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
2624
runs-on: ubuntu-latest
25+
2726
permissions:
28-
actions: read
29-
contents: read
27+
# required for all workflows
3028
security-events: write
3129

32-
strategy:
33-
fail-fast: false
34-
matrix:
35-
language: [ 'javascript' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37-
# Learn more about CodeQL language support at https://git.io/codeql-language-support
30+
# only required for workflows in private repositories
31+
actions: read
32+
contents: read
3833

3934
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v3
42-
43-
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
46-
with:
47-
# Run extended queries including queries using machine learning
48-
queries: security-extended
49-
languages: ${{ matrix.language }}
50-
# If you wish to specify custom queries, you can do so here or in a config file.
51-
# By default, queries listed here will override any specified in a config file.
52-
# Prefix the list here with "+" to use these queries and those in the config file.
53-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
54-
55-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
56-
# If this step fails, then you should remove it and run the build manually (see below)
57-
- name: Autobuild
58-
uses: github/codeql-action/autobuild@v2
59-
60-
# ℹ️ Command-line programs to run using the OS shell.
61-
# 📚 https://git.io/JvXDl
62-
63-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
64-
# and modify them (or add more) to build your code if your project
65-
# uses a compiled language
66-
67-
#- run: |
68-
# make bootstrap
69-
# make release
70-
71-
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
35+
- name: Checkout
36+
uses: actions/checkout@v3
37+
38+
# Initializes the CodeQL tools for scanning.
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v2
41+
with:
42+
# Run extended queries including queries using machine learning
43+
queries: security-extended
44+
languages: ${{ matrix.language }}
45+
46+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
47+
# If this step fails, then you should remove it and run the build manually (see below).
48+
- name: Autobuild
49+
uses: github/codeql-action/autobuild@v2
50+
51+
# ℹ️ Command-line programs to run using the OS shell.
52+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
53+
54+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
55+
# three lines and modify them (or add more) to build your code if your
56+
# project uses a compiled language
57+
58+
#- run: |
59+
# make bootstrap
60+
# make release
61+
62+
- name: Perform CodeQL Analysis
63+
uses: github/codeql-action/analyze@v2

.github/workflows/deploy-prod.yml renamed to .github/workflows/deploy-firebase-production.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
name: Deploy to Live Channel
1+
name: Deploy to Firebase (production)
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
76

87
jobs:
9-
deploy_live_website:
8+
deploy:
9+
name: Deploy
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout Repository
12+
- name: Checkout
1313
uses: actions/checkout@v3
1414

1515
- name: Deploy to Firebase (production)

.github/workflows/deploy-netlify.yml renamed to .github/workflows/deploy-netlify-production.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
1-
name: Deploy to Netlify
1+
name: Deploy to Netlify (production)
22

33
on:
44
push:
55
branches: [main]
66

77
jobs:
8-
build:
9-
name: Push build files to Netlify
8+
deploy:
9+
name: Deploy
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout Repository
12+
- name: Checkout
1313
uses: actions/checkout@v3
1414

15-
- name: Setup Environment
16-
run: mv packages/hoppscotch-app/.env.example packages/hoppscotch-app/.env
15+
- name: Setup environment
16+
run: mv .env.example .env
1717

18-
- name: Setup and run pnpm install
19-
uses: pnpm/[email protected].2
18+
- name: Setup pnpm
19+
uses: pnpm/[email protected].4
2020
with:
2121
version: 7
2222
run_install: true
2323

24-
- name: Build Site
24+
- name: Setup node
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ matrix.node }}
28+
cache: pnpm
29+
30+
- name: Build site
2531
env:
2632
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
2733
VITE_SENTRY_ENVIRONMENT: production
@@ -30,12 +36,12 @@ jobs:
3036

3137
# Deploy the production site with netlify-cli
3238
- name: Deploy to Netlify (production)
33-
run: npx netlify-cli deploy --dir=packages/hoppscotch-app/dist --prod
39+
run: npx netlify-cli deploy --dir=packages/hoppscotch-web/dist --prod
3440
env:
3541
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_PRODUCTION_SITE_ID }}
3642
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
3743

38-
- name: Create Sentry Release
44+
- name: Create Sentry release
3945
uses: getsentry/action-release@v1
4046
env:
4147
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

.github/workflows/deploy-staging-netlify.yml renamed to .github/workflows/deploy-netlify-staging.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1-
name: Deploy to Staging Netlify
1+
name: Deploy to Netlify (staging)
22

33
on:
44
push:
5-
# TODO: Migrate to staging branch only
6-
branches: [main]
5+
branches: [staging]
6+
pull_request:
7+
branches: [staging]
78

89
jobs:
9-
build:
10-
name: Push build files to Netlify
10+
deploy:
11+
name: Deploy
1112
runs-on: ubuntu-latest
1213
steps:
13-
- name: Checkout Repository
14+
- name: Checkout
1415
uses: actions/checkout@v3
1516

16-
- name: Setup and run pnpm install
17-
uses: pnpm/[email protected].2
17+
- name: Setup pnpm
18+
uses: pnpm/[email protected].4
1819
env:
1920
VITE_BACKEND_GQL_URL: ${{ secrets.STAGING_BACKEND_GQL_URL }}
2021
with:
2122
version: 7
2223
run_install: true
2324

24-
- name: Build Site
25+
- name: Setup node
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: ${{ matrix.node }}
29+
cache: pnpm
30+
31+
- name: Build site
2532
env:
2633
VITE_GA_ID: ${{ secrets.STAGING_GA_ID }}
2734
VITE_GTM_ID: ${{ secrets.STAGING_GTM_ID }}
@@ -42,12 +49,12 @@ jobs:
4249

4350
# Deploy the staging site with netlify-cli
4451
- name: Deploy to Netlify (staging)
45-
run: npx netlify-cli deploy --dir=packages/hoppscotch-app/dist --prod
52+
run: npx netlify-cli deploy --dir=packages/hoppscotch-web/dist --prod
4653
env:
4754
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_STAGING_SITE_ID }}
4855
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
4956

50-
- name: Create Sentry Release
57+
- name: Create Sentry release
5158
uses: getsentry/action-release@v1
5259
env:
5360
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy to Netlify (ui)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
# run this workflow only if an update is made to the ui package
7+
paths:
8+
- "packages/hoppscotch-ui/**"
9+
10+
jobs:
11+
deploy:
12+
name: Deploy
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Setup environment
19+
run: mv .env.example .env
20+
21+
- name: Setup pnpm
22+
uses: pnpm/[email protected]
23+
with:
24+
version: 7
25+
run_install: true
26+
27+
- name: Setup node
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node }}
31+
cache: pnpm
32+
33+
- name: Build site
34+
run: pnpm run generate-ui
35+
36+
# Deploy the ui site with netlify-cli
37+
- name: Deploy to Netlify (ui)
38+
run: npx netlify-cli deploy --dir=packages/hoppscotch-ui/.histoire/dist --prod
39+
env:
40+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_UI_SITE_ID }}
41+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

.github/workflows/publish-docker.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,20 @@ on:
77
types: [published]
88

99
jobs:
10-
push_to_registry:
11-
name: Push Docker image to Docker Hub
10+
publish:
11+
name: Publish
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Check out the repo
14+
- name: Maximize build space
15+
uses: easimon/maximize-build-space@master
16+
with:
17+
root-reserve-mb: 8192
18+
swap-size-mb: 18432
19+
remove-dotnet: 'true'
20+
remove-android: 'true'
21+
remove-haskell: 'true'
22+
23+
- name: Checkout
1524
uses: actions/checkout@v3
1625

1726
- name: Set up QEMU
@@ -41,6 +50,6 @@ jobs:
4150
with:
4251
context: .
4352
push: true
44-
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
53+
platforms: linux/amd64,linux/arm64
4554
tags: ${{ steps.meta.outputs.tags }}
4655
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/tests.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,36 @@ name: Node.js CI
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, staging]
66
pull_request:
7-
branches: [main]
7+
branches: [main, staging]
88

99
jobs:
10-
build:
10+
test:
11+
name: Test
1112
runs-on: ubuntu-latest
1213

1314
strategy:
1415
matrix:
1516
node-version: ["lts/*"]
1617

1718
steps:
18-
- name: Checkout Repository
19+
- name: Checkout
1920
uses: actions/checkout@v3
2021

21-
- name: Setup Environment
22-
run: mv packages/hoppscotch-app/.env.example packages/hoppscotch-app/.env
22+
- name: Setup environment
23+
run: mv .env.example .env
2324

24-
- name: Setup and run pnpm install
25-
uses: pnpm/[email protected].2
25+
- name: Setup pnpm
26+
uses: pnpm/[email protected].4
2627
with:
2728
version: 7
2829
run_install: true
2930

30-
- name: Use Node.js ${{ matrix.node-version }}
31+
- name: Setup node
3132
uses: actions/setup-node@v3
3233
with:
33-
node-version: ${{ matrix.node-version }}
34+
node-version: ${{ matrix.node }}
3435
cache: pnpm
3536

3637
- name: Run tests

0 commit comments

Comments
 (0)