Skip to content

Commit

Permalink
feat: new convenient ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Vullriede committed Oct 24, 2024
1 parent d1391b1 commit 8ff4c91
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-on-push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: build-on-push

on: [ push, pull_request ]
on:
push:
branches-ignore:
- main

jobs:
build-on-push:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-release-on-main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
build-release-on-main-push:
if: ${{ !contains(github.event.head_commit.message, '[release]') }} # prevent recursive releases
runs-on: ubuntu-latest

permissions:
Expand All @@ -18,7 +19,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: main
token: ${{secrets.PAT_DEPENDABOT_PR_AUTO_MERGE}}
token: ${{secrets.PAT_GH_CI}}

- name: setup-jdk
uses: actions/setup-java@v4
Expand All @@ -32,6 +33,9 @@ jobs:
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: maven-build-verify
run: mvn --batch-mode verify

- uses: qoomon/actions--setup-git@v1
with:
user: actor
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependabot-pr-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.PAT_DEPENDABOT_PR_AUTO_MERGE}}
GH_TOKEN: ${{secrets.PAT_GH_CI}}

- name: dependabot-pr-auto-merge
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.PAT_DEPENDABOT_PR_AUTO_MERGE}}
GH_TOKEN: ${{secrets.PAT_GH_CI}}
5 changes: 3 additions & 2 deletions .github/workflows/release-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ jobs:
release-notes-from-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: checkout
uses: actions/checkout@v4
- name: Release

- name: create-release-notes
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
4 changes: 4 additions & 0 deletions src/main/java/net/osslabz/crypto/OhlcAsset.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public record OhlcAsset(TradingAsset tradingAsset, Interval interval) {
Objects.requireNonNull(interval, "interval cannot be null");
}

public OhlcAsset(Exchange exchange, CurrencyPair currencyPair, Interval interval) {
this(new TradingAsset(exchange, currencyPair), interval);
}

public OhlcAsset(Exchange exchange, String baseCurrencyCode, String counterCurrencyCode, Interval interval) {
this(new TradingAsset(exchange, new CurrencyPair(baseCurrencyCode, counterCurrencyCode)), interval);
}
Expand Down

0 comments on commit 8ff4c91

Please sign in to comment.