mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #5325] [MERGED] feat: collection variables #5159
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5325
Author: @nivedin
Created: 8/12/2025
Status: ✅ Merged
Merged: 8/22/2025
Merged by: @jamesgeorge007
Base:
next← Head:feat/collection-variables📝 Commits (10+)
7e68e4ffeat: add collection variable in collection schema76e5bfachore: add UI for collection variablec7c94e5chore: add platform level functions70fd872chore: add schema in persistance statea3ba029chore: update runners6c851c5chore: update helper functions438a672chore: add request variable to aggregated varse8dee46chore: update viewer access options9294f08chore: cleanup9efe226chore: update envInput and increase tippy z index📊 Changes
77 files changed (+2688 additions, -765 deletions)
View changed files
➕
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/collection-with-variables.json(+102 -0)📝
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/multiple-child-collections-auth-headers-coll.json(+9 -1)📝
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/valid-mixed-versions-coll.json(+1 -0)📝
packages/hoppscotch-cli/src/__tests__/unit/fixtures/workspace-access.mock.ts(+183 -41)📝
packages/hoppscotch-cli/src/__tests__/unit/workspace-access.spec.ts(+12 -10)📝
packages/hoppscotch-cli/src/types/request.ts(+8 -2)📝
packages/hoppscotch-cli/src/utils/collections.ts(+20 -0)📝
packages/hoppscotch-cli/src/utils/getters.ts(+31 -4)📝
packages/hoppscotch-cli/src/utils/pre-request.ts(+8 -4)📝
packages/hoppscotch-cli/src/utils/request.ts(+4 -2)📝
packages/hoppscotch-cli/src/utils/workspace-access.ts(+16 -5)📝
packages/hoppscotch-common/assets/scss/styles.scss(+5 -0)📝
packages/hoppscotch-common/assets/themes/tippy-themes.scss(+1 -0)📝
packages/hoppscotch-common/locales/en.json(+1 -0)📝
packages/hoppscotch-common/src/components.d.ts(+1 -0)📝
packages/hoppscotch-common/src/components/collections/Collection.vue(+19 -11)📝
packages/hoppscotch-common/src/components/collections/ImportExport.vue(+2 -1)📝
packages/hoppscotch-common/src/components/collections/Properties.vue(+104 -78)📝
packages/hoppscotch-common/src/components/collections/Request.vue(+10 -10)📝
packages/hoppscotch-common/src/components/collections/SaveRequest.vue(+19 -55)...and 57 more files
📄 Description
Closes FE-900 #3736
This pull request add collection-level variables in the workflow. User can add variable in collection or folders and the subsequent request can inherit the variables. Also each folder can also inherit their parent collection/ folder variables.
https://github.com/user-attachments/assets/d90a1915-fff8-4187-82d3-65063896f9c6
TODO
Graphql support(can be iterated once environment is implemented in graphql)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.