Skip to content

Commit ea1d8b2

Browse files
author
方佳
committed
Merge branch 'main_merge_102501' into 'main'
feat:EventMarket add rulesPrimary See merge request webull/webull-openapi-java-sdk!55
2 parents 9055a89 + 1f9fff4 commit ea1d8b2

6 files changed

Lines changed: 30 additions & 11 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
workflow_dispatch:
44
inputs:
55
tag:
6-
description: "Release tag (e.g. v2.0.6)"
6+
description: "Release tag (e.g. 2.0.6)"
77
required: true
88
push:
99
branches:
@@ -39,22 +39,23 @@ jobs:
3939
4040
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
4141
# manual trigger: use the provided tag, always release
42+
# tolerate an optional leading 'v' in the input for convenience
4243
TAG_VERSION="${INPUT_TAG#v}"
4344
if [ "$TAG_VERSION" != "$CURRENT_VERSION" ]; then
4445
echo "::error::Input tag ($TAG_VERSION) does not match pom.xml version ($CURRENT_VERSION)"
4546
exit 1
4647
fi
47-
echo "tag=v${CURRENT_VERSION}" >> "$GITHUB_OUTPUT"
48+
echo "tag=${CURRENT_VERSION}" >> "$GITHUB_OUTPUT"
4849
echo "should_release=true" >> "$GITHUB_OUTPUT"
49-
echo "Manual release requested for v${CURRENT_VERSION}"
50+
echo "Manual release requested for ${CURRENT_VERSION}"
5051
else
5152
# push to main: only release when the pom version changed vs the previous commit
5253
PREV_VERSION=$(git show HEAD~1:webull-openapi-java-sdk/pom.xml 2>/dev/null \
5354
| grep -oE '<version>[^<]+</version>' | head -1 \
5455
| sed -E 's/<\/?version>//g' || echo "")
5556
echo "current=${CURRENT_VERSION} previous=${PREV_VERSION}"
5657
if [ "$CURRENT_VERSION" != "$PREV_VERSION" ]; then
57-
echo "tag=v${CURRENT_VERSION}" >> "$GITHUB_OUTPUT"
58+
echo "tag=${CURRENT_VERSION}" >> "$GITHUB_OUTPUT"
5859
echo "should_release=true" >> "$GITHUB_OUTPUT"
5960
echo "Version changed ($PREV_VERSION -> $CURRENT_VERSION), will release"
6061
else
@@ -86,7 +87,7 @@ jobs:
8687
VERSION: ${{ steps.decide.outputs.tag }}
8788
run: |
8889
set -euo pipefail
89-
POM_VERSION="${VERSION#v}" # jar file names use the bare version, tag has a 'v' prefix
90+
POM_VERSION="${VERSION}" # tag equals the bare pom version (no 'v' prefix)
9091
TARGET="webull-openapi-java-sdk/target"
9192
mkdir -p dist
9293
STAGE="dist/webull-openapi-java-sdk-${VERSION}"
@@ -126,7 +127,15 @@ jobs:
126127
VERSION: ${{ steps.decide.outputs.tag }}
127128
run: |
128129
set -euo pipefail
130+
RELEASE_TITLE="webull openapi-java-sdk ${VERSION}"
131+
# release notes use the latest commit message, with the [ISSUE-KEY] marker stripped
132+
# e.g. "feat[API-1931]: auto-tag" -> "feat: auto-tag"
133+
RELEASE_NOTES="$(git log -1 --pretty=%B | sed -E 's/^([a-z]+)\[[^]]*\]:/\1:/')"
129134
if gh release view "${VERSION}" --repo "${GITHUB_REPOSITORY}" > /dev/null 2>&1; then
135+
gh release edit "${VERSION}" \
136+
--repo "${GITHUB_REPOSITORY}" \
137+
--title "${RELEASE_TITLE}" \
138+
--notes "${RELEASE_NOTES}"
130139
gh release upload "${VERSION}" \
131140
dist/webull-openapi-java-sdk-*.zip \
132141
dist/webull-openapi-java-sdk-*.tar.gz \
@@ -139,6 +148,6 @@ jobs:
139148
dist/webull-openapi-java-sdk-*.tar.gz \
140149
dist/SHA256SUMS \
141150
--repo "${GITHUB_REPOSITORY}" \
142-
--title "${VERSION}" \
143-
--generate-notes
151+
--title "${RELEASE_TITLE}" \
152+
--notes "${RELEASE_NOTES}"
144153
fi

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<groupId>com.webull.openapi</groupId>
2222
<artifactId>webull-openapi-java-sdk-parent</artifactId>
2323
<packaging>pom</packaging>
24-
<version>2.0.6</version>
24+
<version>2.0.7</version>
2525

2626
<name>webull-openapi-java-sdk-parent</name>
2727
<url>https://github.com/webull-inc/webull-openapi-java-sdk/</url>

‎webull-openapi-java-sdk-samples/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>com.webull.openapi</groupId>
2121
<artifactId>webull-openapi-java-sdk-parent</artifactId>
22-
<version>2.0.6</version>
22+
<version>2.0.7</version>
2323
</parent>
2424
<modelVersion>4.0.0</modelVersion>
2525

‎webull-openapi-java-sdk/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.webull.openapi</groupId>
99
<artifactId>webull-openapi-java-sdk-parent</artifactId>
10-
<version>2.0.6</version>
10+
<version>2.0.7</version>
1111
</parent>
1212

1313
<artifactId>webull-openapi-java-sdk</artifactId>

‎webull-openapi-java-sdk/src/main/java/com/webull/openapi/core/config/ProjectReaderHelper.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private ProjectReaderHelper() {
2424

2525
private static final String APPLICATION_VERSION = "application.version";
2626

27-
private static final String DEFAULT_APPLICATION_VERSION = "2.0.6";
27+
private static final String DEFAULT_APPLICATION_VERSION = "2.0.7";
2828

2929
private static final String APPLICATION_NAME = "application.name";
3030

‎webull-openapi-java-sdk/src/main/java/com/webull/openapi/data/quotes/domain/EventMarket.java‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public class EventMarket {
2121
private String latestExpDate;
2222
private String payoutDate;
2323
private Boolean fractionable;
24+
private String rulesPrimary;
2425
private List<PriceRange> priceRanges;
2526

2627
public static class PriceRange {
@@ -198,6 +199,14 @@ public void setFractionable(Boolean fractionable) {
198199
this.fractionable = fractionable;
199200
}
200201

202+
public String getRulesPrimary() {
203+
return rulesPrimary;
204+
}
205+
206+
public void setRulesPrimary(String rulesPrimary) {
207+
this.rulesPrimary = rulesPrimary;
208+
}
209+
201210
public List<PriceRange> getPriceRanges() {
202211
return priceRanges;
203212
}
@@ -224,6 +233,7 @@ public String toString() {
224233
", latestExpDate='" + latestExpDate + '\'' +
225234
", payoutDate='" + payoutDate + '\'' +
226235
", fractionable='" + fractionable + '\'' +
236+
", rulesPrimary='" + rulesPrimary + '\'' +
227237
", priceRanges='" + priceRanges + '\'' +
228238
'}';
229239
}

0 commit comments

Comments
 (0)