Skip to content

Commit

Permalink
Merge branch 'main' of github.com:juspay/hyperswitch into add-metrics…
Browse files Browse the repository at this point in the history
…-router

* 'main' of github.com:juspay/hyperswitch: (84 commits)
  chore(config): add merchant_secret config for webhooks for  cashtocode and volt in wasm dashboard (#3333)
  chore(version): 2024.01.12.0
  fix: update amount_capturable based on intent_status and payment flow (#3278)
  feat: add support for card extended bin in payment attempt (#3312)
  feat(connector): [cybersource] Implement 3DS flow for cards (#3290)
  chore: remove connector auth TOML files from `.gitignore` and `.dockerignore` (#3330)
  fix(refund): add merchant_connector_id in refund (#3303)
  feat(connector): [BOA/CYB] Store AVS response in connector_metadata (#3271)
  feat(outgoingwebhookevent): adding api for query to fetch outgoing webhook events log (#3310)
  feat(router): payment_method block (#3056)
  feat(connector): [Volt] Add support for refund webhooks  (#3326)
  feat(users): invite user without email (#3328)
  feat(euclid_wasm): config changes for NMI (#3329)
  refactor(router): restricted list payment method Customer to api-key based (#3100)
  feat(connector): [BOA/Cyb] Include merchant metadata in capture and void requests (#3308)
  fix(router): add config to avoid connector tokenization for `apple pay` `simplified flow` (#3234)
  refactor(router): flagged order_details validation to skip validation (#3116)
  fix(core): surcharge with saved card failure (#3318)
  feat(payment_link): Added sdk layout option payment link (#3207)
  chore(version): 2024.01.11.0
  ...
  • Loading branch information
pixincreate committed Jan 12, 2024
2 parents 9eb8bb3 + 57f2cff commit 327e603
Show file tree
Hide file tree
Showing 317 changed files with 17,672 additions and 4,363 deletions.
11 changes: 6 additions & 5 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ rustflags = [
"-Funsafe_code",
"-Wclippy::as_conversions",
"-Wclippy::expect_used",
"-Wclippy::index_refutable_slice",
"-Wclippy::indexing_slicing",
"-Wclippy::match_on_vec_items",
"-Wclippy::missing_panics_doc",
"-Wclippy::panic_in_result_fn",
"-Wclippy::out_of_bounds_indexing",
"-Wclippy::panic",
"-Wclippy::panic_in_result_fn",
"-Wclippy::panicking_unwrap",
"-Wclippy::todo",
"-Wclippy::unimplemented",
Expand All @@ -23,10 +27,7 @@ rustflags = [


[build]
rustdocflags = [
"--cfg",
"uuid_unstable"
]
rustdocflags = ["--cfg", "uuid_unstable"]

[alias]
gen-pg = "generate --path ../../../../connector-template -n"
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,3 @@ result*

# node_modules
node_modules/

**/connector_auth.toml
**/sample_auth.toml
**/auth.toml
7 changes: 4 additions & 3 deletions .github/git-cliff-changelog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body = """
{% set commit_base_url = "https://github.com/juspay/hyperswitch/commit/" -%}
{% set compare_base_url = "https://github.com/juspay/hyperswitch/compare/" -%}
{% if version -%}
## {{ version | trim_start_matches(pat="v") }} ({{ timestamp | date(format="%Y-%m-%d") }})
## {{ version }}
{% else -%}
## [unreleased]
{% endif -%}
Expand Down Expand Up @@ -69,7 +69,8 @@ commit_parsers = [
{ message = "^(?i)(refactor)", group = "<!-- 4 -->Refactors" },
{ message = "^(?i)(test)", group = "<!-- 5 -->Testing" },
{ message = "^(?i)(docs)", group = "<!-- 6 -->Documentation" },
{ message = "^(?i)(chore\\(version\\)): V[\\d]+\\.[\\d]+\\.[\\d]+", skip = true },
{ message = "^(?i)(chore\\(version\\)): (V|v)[\\d]+\\.[\\d]+\\.[\\d]+", skip = true },
{ message = "^(?i)(chore\\(version\\)): [0-9]{4}\\.[0-9]{2}\\.[0-9]{2}(\\.[0-9]+)?(-.+)?", skip = true },
{ message = "^(?i)(chore)", group = "<!-- 7 -->Miscellaneous Tasks" },
{ message = "^(?i)(build)", group = "<!-- 8 -->Build System / Dependencies" },
{ message = "^(?i)(ci)", skip = true },
Expand All @@ -79,7 +80,7 @@ protect_breaking_commits = false
# filter out the commits that are not matched by commit parsers
filter_commits = false
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
tag_pattern = "[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}(\\.[0-9]+)?(-.+)?"
# regex for skipping tags
# skip_tags = "v0.1.0-beta.1"
# regex for ignoring tags
Expand Down
95 changes: 0 additions & 95 deletions .github/workflows/release-new-version.yml

This file was deleted.

153 changes: 153 additions & 0 deletions .github/workflows/release-nightly-version-reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: Create a nightly tag

on:
workflow_call:
secrets:
token:
description: GitHub token for authenticating with GitHub
required: true
outputs:
tag:
description: The tag that was created by the workflow
value: ${{ jobs.create-nightly-tag.outputs.tag }}

env:
# Allow more retries for network requests in cargo (downloading crates) and
# rustup (installing toolchains). This should help to reduce flaky CI failures
# from transient network timeouts or other issues.
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10

# The branch name that this workflow is allowed to run on.
# If the workflow is run on any other branch, this workflow will fail.
ALLOWED_BRANCH_NAME: main

jobs:
create-nightly-tag:
name: Create a nightly tag
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.token }}

- name: Check if the workflow is run on an allowed branch
shell: bash
run: |
if [[ "${{ github.ref }}" != "refs/heads/${ALLOWED_BRANCH_NAME}" ]]; then
echo "::error::This workflow is expected to be run from the '${ALLOWED_BRANCH_NAME}' branch. Current branch: '${{ github.ref }}'"
exit 1
fi
- name: Check if the latest commit is a tag
shell: bash
run: |
if [[ -n "$(git tag --points-at HEAD)" ]]; then
echo "::error::The latest commit on the branch is already a tag"
exit 1
fi
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Install git-cliff
uses: baptiste0928/[email protected]
with:
crate: git-cliff
version: 1.4.0

- name: Obtain previous and next tag information
shell: bash
run: |
# Calendar versioning format followed: `YYYY.0M.0D.MICRO`
# - MICRO version number starts from 0 (to allow for multiple tags in a single day)
# - Hotfixes or patches can be suffixed as `-hotfix1` or `-patch1` after the MICRO version number
CURRENT_UTC_DATE="$(date --utc '+%04Y.%02m.%02d')"
# Check if any tags exist on the current branch which contain the current UTC date
if ! git tag --merged | grep --quiet "${CURRENT_UTC_DATE}"; then
# Search for date-like tags (no strict checking), sort and obtain previous tag
PREVIOUS_TAG="$(
git tag --merged \
| grep --extended-regexp '[0-9]{4}\.[0-9]{2}\.[0-9]{2}' \
| sort --version-sort \
| tail --lines 1
)"
# No tags with current date exist, next tag will be just tagged with current date and micro version number 0
NEXT_MICRO_VERSION_NUMBER='0'
NEXT_TAG="${CURRENT_UTC_DATE}.${NEXT_MICRO_VERSION_NUMBER}"
else
# Some tags exist with current date, find out latest micro version number
PREVIOUS_TAG="$(
git tag --merged \
| grep "${CURRENT_UTC_DATE}" \
| sort --version-sort \
| tail --lines 1
)"
PREVIOUS_MICRO_VERSION_NUMBER="$(
echo -n "${PREVIOUS_TAG}" \
| sed --regexp-extended 's/[0-9]{4}\.[0-9]{2}\.[0-9]{2}(\.([0-9]+))?(-(.+))?/\2/g'
)"
# ^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^ ^^^^
# YEAR MONTH DAY MICRO Any suffix, say `hotfix1`
#
# The 2nd capture group contains the micro version number
if [[ -z "${PREVIOUS_MICRO_VERSION_NUMBER}" ]]; then
# Micro version number is empty, set next micro version as 1
NEXT_MICRO_VERSION_NUMBER='1'
else
# Increment previous micro version by 1 and set it as next micro version
NEXT_MICRO_VERSION_NUMBER="$((PREVIOUS_MICRO_VERSION_NUMBER + 1))"
fi
NEXT_TAG="${CURRENT_UTC_DATE}.${NEXT_MICRO_VERSION_NUMBER}"
fi
echo "PREVIOUS_TAG=${PREVIOUS_TAG}" >> $GITHUB_ENV
echo "NEXT_TAG=${NEXT_TAG}" >> $GITHUB_ENV
- name: Generate changelog
shell: bash
run: |
# Generate changelog content and store it in `release-notes.md`
git-cliff --config '.github/git-cliff-changelog.toml' --strip header --tag "${NEXT_TAG}" "${PREVIOUS_TAG}^.." \
| sed "/## ${PREVIOUS_TAG}\$/,\$d" \
| sed '$s/$/\n- - -/' > release-notes.md
# Append release notes after the specified pattern in `CHANGELOG.md`
sed --in-place '0,/^- - -/!b; /^- - -/{
a
r release-notes.md
}' CHANGELOG.md
rm release-notes.md
- name: Set git configuration
shell: bash
run: |
git config --local user.name 'github-actions'
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Commit, tag and push generated changelog
shell: bash
run: |
git add CHANGELOG.md
git commit --message "chore(version): ${NEXT_TAG}"
git tag "${NEXT_TAG}" HEAD
git push origin "${ALLOWED_BRANCH_NAME}"
git push origin "${NEXT_TAG}"
- name: Set job outputs
shell: bash
run: |
echo "tag=${NEXT_TAG}" >> $GITHUB_OUTPUT
Loading

0 comments on commit 327e603

Please sign in to comment.