Skip to content

Commit 069d991

Browse files
committed
Merge branch 'main' of github.com:juspay/hyperswitch into add-cypress-ci
* 'main' of github.com:juspay/hyperswitch: (27 commits) refactor(connector): added amount conversion framework for billwerk (#4972) feat(connector): [Itaubank] Add refund and rsync flow (#5420) feat: create additional columns in organization table (#5380) refactor(merchant_id): create domain type for `merchant_id` (#5408) fix(euclid): remove business_profile routing feature flag (#5430) feat: add create retrieve and update api endpoints for organization resource (#5361) chore(version): 2024.07.24.0 refactor(connector): [Itaubank] add dynamic fields for pix (#5419) Feat(connector): [WELLSFARGO] Add template code (#5333) fix(connector): [Datatrans] Handling for 4-Digit YYYY input and Correct 3DS Routing to no_3ds (#5410) refactor(connector): add amount conversion framework to volt (#4985) chore(users): email templates footer icon style enhance (#5375) feat(customer): customer v2 refactor for customer create end point (#5350) chore(version): 2024.07.23.0 fix(router): store `network_transaction_id` in stripe `authorize` flow (#5399) ci: handle packages to run are being empty (#5403) chore: add customer, shipping and billing details to payment_response for payment list api (#5401) refactor(dashboard_metadata): alter query for merchant scoped metadata (#5397) refactor(connector): Add billing_country in klarna dynamic fields (#5373) feat(connector): [Itau Bank] Add payment and sync flow for Pix (#5342) ...
2 parents b3fa154 + 9d9dce9 commit 069d991

File tree

525 files changed

+9913
-4785
lines changed

Some content is hidden

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

525 files changed

+9913
-4785
lines changed

.github/scripts/install-jq.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#! /usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
if [[ "${CI:-false}" != "true" && "${GITHUB_ACTIONS:-false}" != "true" ]]; then
6+
echo "This script is to be run in a GitHub Actions runner only. Exiting."
7+
exit 1
8+
fi
9+
10+
mkdir -p ~/.local/bin
11+
12+
if [[ "${RUNNER_OS}" == 'Linux' && "${RUNNER_ARCH}" == 'X64' ]]; then
13+
JQ_ARCH='amd64'
14+
elif [[ "${RUNNER_OS}" == 'Linux' && "${RUNNER_ARCH}" == 'ARM64' ]]; then
15+
JQ_ARCH='arm64'
16+
else
17+
echo "::error::Unsupported runner OS or architecture"
18+
exit 1
19+
fi
20+
21+
# Download latest `jq` binary
22+
curl \
23+
--fail \
24+
--silent \
25+
--show-error \
26+
--location \
27+
--output ~/.local/bin/jq \
28+
"https://github.com/jqlang/jq/releases/latest/download/jq-linux-${JQ_ARCH}"
29+
30+
chmod +x ~/.local/bin/jq
31+
32+
# Update PATH
33+
echo "$HOME/.local/bin" >> "${GITHUB_PATH}"

.github/workflows/CI-pr.yml

Lines changed: 25 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -134,61 +134,23 @@ jobs:
134134
tool: cargo-hack
135135
checksum: true
136136

137+
- name: Install just
138+
uses: taiki-e/[email protected]
139+
with:
140+
tool: just
141+
checksum: true
142+
143+
- name: Install jq
144+
shell: bash
145+
run: .github/scripts/install-jq.sh
146+
137147
- name: Deny warnings
138148
shell: bash
139149
run: sed -i 's/rustflags = \[/rustflags = \[\n "-Dwarnings",/' .cargo/config.toml
140150

141-
- name: Check modified crates
151+
- name: Cargo hack
142152
shell: bash
143-
run: |
144-
# Obtain a list of workspace members
145-
workspace_members="$(
146-
cargo metadata --format-version 1 --no-deps \
147-
| jq \
148-
--compact-output \
149-
--monochrome-output \
150-
--raw-output \
151-
'(.workspace_members | sort) as $package_ids | .packages[] | select(IN(.id; $package_ids[])) | .name'
152-
)"
153-
154-
PACKAGES_CHECKED=()
155-
PACKAGES_SKIPPED=()
156-
157-
while IFS= read -r package_name; do
158-
# Obtain comma-separated list of transitive workspace dependencies for each workspace member
159-
change_paths="$(cargo tree --all-features --no-dedupe --prefix none --package "${package_name}" \
160-
| grep 'crates/' \
161-
| sort --unique \
162-
| awk --field-separator ' ' '{ printf "crates/%s\n", $1 }' | paste -d ',' -s -)"
163-
164-
# Store change paths in an array by splitting `change_paths` by comma
165-
IFS=',' read -ra change_paths <<< "${change_paths}"
166-
167-
# A package must be checked if any of its transitive dependencies (or itself) has been modified
168-
if git diff --exit-code --quiet "origin/${GITHUB_BASE_REF}" -- "${change_paths[@]}"; then
169-
printf '::debug::Skipping `%s` since none of these paths were modified: %s\n' "${package_name}" "${change_paths[*]}"
170-
PACKAGES_SKIPPED+=("${package_name}")
171-
else
172-
printf '::debug::Checking `%s` since at least one of these paths was modified: %s\n' "${package_name}" "${change_paths[*]}"
173-
PACKAGES_CHECKED+=("${package_name}")
174-
fi
175-
done <<< "${workspace_members}"
176-
177-
printf '::notice::Packages checked: %s; Packages skipped: %s\n' "${PACKAGES_CHECKED[*]}" "${PACKAGES_SKIPPED[*]}"
178-
echo "PACKAGES_CHECKED=${PACKAGES_CHECKED[*]}" >> ${GITHUB_ENV}
179-
echo "PACKAGES_SKIPPED=${PACKAGES_SKIPPED[*]}" >> ${GITHUB_ENV}
180-
181-
- name: Run `cargo hack` on modified crates
182-
shell: bash
183-
run: |
184-
# Store packages to check in an array by splitting `PACKAGES_CHECKED` by space
185-
IFS=' ' read -ra PACKAGES_CHECKED <<< "${PACKAGES_CHECKED}"
186-
187-
for package in "${PACKAGES_CHECKED[@]}"; do
188-
printf '::group::Running `cargo hack` on package `%s`\n' "${package}"
189-
cargo hack check --each-feature --all-targets --package "${package}"
190-
echo '::endgroup::'
191-
done
153+
run: just ci_hack
192154

193155
# cargo-deny:
194156
# name: Run cargo-deny
@@ -271,6 +233,16 @@ jobs:
271233
tool: cargo-hack
272234
checksum: true
273235

236+
- name: Install just
237+
uses: taiki-e/[email protected]
238+
with:
239+
tool: just
240+
checksum: true
241+
242+
- name: Install jq
243+
shell: bash
244+
run: .github/scripts/install-jq.sh
245+
274246
# - name: Install cargo-nextest
275247
# uses: taiki-e/[email protected]
276248
# with:
@@ -289,7 +261,7 @@ jobs:
289261

290262
- name: Run clippy
291263
shell: bash
292-
run: cargo clippy --all-features --all-targets
264+
run: just clippy
293265

294266
- name: Check Cargo.lock changed
295267
if: ${{ (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}
@@ -303,57 +275,9 @@ jobs:
303275
git push
304276
fi
305277
306-
- name: Check modified crates
307-
shell: bash
308-
run: |
309-
# Obtain a list of workspace members
310-
workspace_members="$(
311-
cargo metadata --format-version 1 --no-deps \
312-
| jq \
313-
--compact-output \
314-
--monochrome-output \
315-
--raw-output \
316-
'(.workspace_members | sort) as $package_ids | .packages[] | select(IN(.id; $package_ids[])) | .name'
317-
)"
318-
319-
PACKAGES_CHECKED=()
320-
PACKAGES_SKIPPED=()
321-
322-
while IFS= read -r package_name; do
323-
# Obtain comma-separated list of transitive workspace dependencies for each workspace member
324-
change_paths="$(cargo tree --all-features --no-dedupe --prefix none --package "${package_name}" \
325-
| grep 'crates/' \
326-
| sort --unique \
327-
| awk --field-separator ' ' '{ printf "crates/%s\n", $1 }' | paste -d ',' -s -)"
328-
329-
# Store change paths in an array by splitting `change_paths` by comma
330-
IFS=',' read -ra change_paths <<< "${change_paths}"
331-
332-
# A package must be checked if any of its transitive dependencies (or itself) has been modified
333-
if git diff --exit-code --quiet "origin/${GITHUB_BASE_REF}" -- "${change_paths[@]}"; then
334-
printf '::debug::Skipping `%s` since none of these paths were modified: %s\n' "${package_name}" "${change_paths[*]}"
335-
PACKAGES_SKIPPED+=("${package_name}")
336-
else
337-
printf '::debug::Checking `%s` since at least one of these paths was modified: %s\n' "${package_name}" "${change_paths[*]}"
338-
PACKAGES_CHECKED+=("${package_name}")
339-
fi
340-
done <<< "${workspace_members}"
341-
342-
printf '::notice::Packages checked: %s; Packages skipped: %s\n' "${PACKAGES_CHECKED[*]}" "${PACKAGES_SKIPPED[*]}"
343-
echo "PACKAGES_CHECKED=${PACKAGES_CHECKED[*]}" >> ${GITHUB_ENV}
344-
echo "PACKAGES_SKIPPED=${PACKAGES_SKIPPED[*]}" >> ${GITHUB_ENV}
345-
346-
- name: Run `cargo hack` on modified crates
278+
- name: Run cargo check
347279
shell: bash
348-
run: |
349-
# Store packages to check in an array by splitting `PACKAGES_CHECKED` by space
350-
IFS=' ' read -ra PACKAGES_CHECKED <<< "${PACKAGES_CHECKED}"
351-
352-
for package in "${PACKAGES_CHECKED[@]}"; do
353-
printf '::group::Running `cargo hack` on package `%s`\n' "${package}"
354-
cargo hack check --each-feature --all-targets --package "${package}"
355-
echo '::endgroup::'
356-
done
280+
run: just ci_hack
357281

358282
typos:
359283
name: Spell check

.github/workflows/CI-push.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,24 @@ jobs:
7777
with:
7878
crate: cargo-hack
7979

80+
- name: Install just
81+
uses: taiki-e/[email protected]
82+
with:
83+
tool: just
84+
checksum: true
85+
86+
- name: Install jq
87+
shell: bash
88+
run: .github/scripts/install-jq.sh
89+
8090
- name: Deny warnings
8191
shell: bash
8292
run: sed -i 's/rustflags = \[/rustflags = \[\n "-Dwarnings",/' .cargo/config.toml
8393

8494
- name: Cargo hack
8595
if: ${{ github.event_name == 'push' }}
8696
shell: bash
87-
run: cargo hack check --workspace --each-feature --all-targets
97+
run: just ci_hack
8898

8999
- name: Cargo build release
90100
if: ${{ github.event_name == 'merge_group' }}
@@ -143,6 +153,16 @@ jobs:
143153
with:
144154
crate: cargo-hack
145155

156+
- name: Install just
157+
uses: taiki-e/[email protected]
158+
with:
159+
tool: just
160+
checksum: true
161+
162+
- name: Install jq
163+
shell: bash
164+
run: .github/scripts/install-jq.sh
165+
146166
# - name: Install cargo-nextest
147167
# uses: baptiste0928/[email protected]
148168
# with:
@@ -164,12 +184,12 @@ jobs:
164184

165185
- name: Run clippy
166186
shell: bash
167-
run: cargo clippy --all-features --all-targets
187+
run: just clippy
168188

169189
- name: Cargo hack
170190
if: ${{ github.event_name == 'push' }}
171191
shell: bash
172-
run: cargo hack check --workspace --each-feature --all-targets
192+
run: just ci_hack
173193

174194
- name: Cargo build release
175195
if: ${{ github.event_name == 'merge_group' }}

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,76 @@ All notable changes to HyperSwitch will be documented here.
44

55
- - -
66

7+
## 2024.07.24.0
8+
9+
### Features
10+
11+
- **connector:** [WELLSFARGO] Add template code ([#5333](https://github.com/juspay/hyperswitch/pull/5333)) ([`94bb3e7`](https://github.com/juspay/hyperswitch/commit/94bb3e78fddf310d9ee3211f98a386e4f8261242))
12+
- **customer:** Customer v2 refactor for customer create end point ([#5350](https://github.com/juspay/hyperswitch/pull/5350)) ([`aaf1f2b`](https://github.com/juspay/hyperswitch/commit/aaf1f2b1e5e1f473154a57af0d1b9402bd238ec4))
13+
14+
### Bug Fixes
15+
16+
- **connector:** [Datatrans] Handling for 4-Digit YYYY input and Correct 3DS Routing to no_3ds ([#5410](https://github.com/juspay/hyperswitch/pull/5410)) ([`3e16219`](https://github.com/juspay/hyperswitch/commit/3e1621944562a0fca3014a190393b744d235bc4c))
17+
18+
### Refactors
19+
20+
- **connector:**
21+
- Add amount conversion framework to volt ([#4985](https://github.com/juspay/hyperswitch/pull/4985)) ([`e4b3982`](https://github.com/juspay/hyperswitch/commit/e4b3982c13cedf0f7feaec22df414761e22d98df))
22+
- [Itaubank] add dynamic fields for pix ([#5419](https://github.com/juspay/hyperswitch/pull/5419)) ([`afae590`](https://github.com/juspay/hyperswitch/commit/afae5906a8d6ceab136393c7588bfc447e822ddc))
23+
24+
### Miscellaneous Tasks
25+
26+
- **users:** Email templates footer icon style enhance ([#5375](https://github.com/juspay/hyperswitch/pull/5375)) ([`876eeea`](https://github.com/juspay/hyperswitch/commit/876eeea0f426f63d0419021ba85372a016d46e27))
27+
28+
**Full Changelog:** [`2024.07.23.0...2024.07.24.0`](https://github.com/juspay/hyperswitch/compare/2024.07.23.0...2024.07.24.0)
29+
30+
- - -
31+
32+
## 2024.07.23.0
33+
34+
### Features
35+
36+
- **connector:** [Itau Bank] Add payment and sync flow for Pix ([#5342](https://github.com/juspay/hyperswitch/pull/5342)) ([`3fef96e`](https://github.com/juspay/hyperswitch/commit/3fef96e727ebb411d5699b8b37bdec30a2606da0))
37+
38+
### Bug Fixes
39+
40+
- **router:** Store `network_transaction_id` in stripe `authorize` flow ([#5399](https://github.com/juspay/hyperswitch/pull/5399)) ([`be78dfc`](https://github.com/juspay/hyperswitch/commit/be78dfc04eff671fb0b4e6037c84aee8ab367e70))
41+
- Add offset and limit to key transfer API ([#5358](https://github.com/juspay/hyperswitch/pull/5358)) ([`b393803`](https://github.com/juspay/hyperswitch/commit/b393803a6199a12f86d7bbdc998e5a0d8366c000))
42+
43+
### Refactors
44+
45+
- **connector:** Add billing_country in klarna dynamic fields ([#5373](https://github.com/juspay/hyperswitch/pull/5373)) ([`4838a86`](https://github.com/juspay/hyperswitch/commit/4838a86ebcb5000e65293e0d095e5de95e3a64a0))
46+
- **core:** Change primary keys in payment_methods table ([#5393](https://github.com/juspay/hyperswitch/pull/5393)) ([`ca749b3`](https://github.com/juspay/hyperswitch/commit/ca749b32591edcbf4676da4327f8b6ccbc839d4b))
47+
- **dashboard_metadata:** Alter query for merchant scoped metadata ([#5397](https://github.com/juspay/hyperswitch/pull/5397)) ([`eaa391a`](https://github.com/juspay/hyperswitch/commit/eaa391a959076424399fb9331a78a16eaf790478))
48+
- **router:** Make `original_payment_authorized_currency` and `original_payment_authorized_amount` mandatory fields for `Discover` cards and `Cybersource` connector during payment method migration. ([#5370](https://github.com/juspay/hyperswitch/pull/5370)) ([`06f1406`](https://github.com/juspay/hyperswitch/commit/06f1406cbc350a71f961a19dc2a6cfef2ceeb3a1))
49+
50+
### Miscellaneous Tasks
51+
52+
- Add missing logs for surcharge flow ([#5258](https://github.com/juspay/hyperswitch/pull/5258)) ([`bc19fca`](https://github.com/juspay/hyperswitch/commit/bc19fca1f4e76be6131e9c870b8aa1c709fef578))
53+
- Add customer, shipping and billing details to payment_response for payment list api ([#5401](https://github.com/juspay/hyperswitch/pull/5401)) ([`fa6c63b`](https://github.com/juspay/hyperswitch/commit/fa6c63bd5409ec45f23ddf4616c5eb3cf399aa1b))
54+
55+
**Full Changelog:** [`2024.07.20.0...2024.07.23.0`](https://github.com/juspay/hyperswitch/compare/2024.07.20.0...2024.07.23.0)
56+
57+
- - -
58+
59+
## 2024.07.20.0
60+
61+
### Features
62+
63+
- **merchant_account_v2:** Add merchant_account_v2 domain and diesel models ([#5365](https://github.com/juspay/hyperswitch/pull/5365)) ([`5861c5a`](https://github.com/juspay/hyperswitch/commit/5861c5a63b3ab228d886888962e5734b9018eab9))
64+
65+
### Bug Fixes
66+
67+
- Use encrypt api for all encryption and decryption ([#5379](https://github.com/juspay/hyperswitch/pull/5379)) ([`83849a5`](https://github.com/juspay/hyperswitch/commit/83849a5f3cbb1843013535b0631e6e3d38d037b7))
68+
69+
### Refactors
70+
71+
- **core:** Change primary keys in user, user_roles and roles tables ([#5374](https://github.com/juspay/hyperswitch/pull/5374)) ([`b51c8e1`](https://github.com/juspay/hyperswitch/commit/b51c8e1d12c2f0012b8210a6c25c989f9dd89c3b))
72+
73+
**Full Changelog:** [`2024.07.19.1...2024.07.20.0`](https://github.com/juspay/hyperswitch/compare/2024.07.19.1...2024.07.20.0)
74+
75+
- - -
76+
777
## 2024.07.19.1
878

979
### Features

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ precommit : fmt clippy test
112112

113113

114114
hack:
115-
cargo hack check --workspace --each-feature --all-targets
115+
cargo hack check --workspace --each-feature --all-targets --exclude-features 'v2 merchant_account_v2 payment_v2'

0 commit comments

Comments
 (0)