Skip to content

Commit d40e516

Browse files
committed
DEVX-796: merging main
2 parents 2af2911 + 0ac536e commit d40e516

904 files changed

Lines changed: 35120 additions & 2214 deletions

File tree

Some content is hidden

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

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ f00f4fe6ed5e22cdd2e3f68370c2da96e6bbc8e7
2828
53b9d9cc4fc4091b89f84effb6e526371d3bae68
2929
383b1b8dee10fbed5dab6566ea0fe49caf9e15b4
3030
f6aab9d10212756b1d71a0568c706a9df51c322d
31+
4822581aeff072b7649c7aec56a13a95bd58c249
32+
eb09ce06943ccb460981afaa6b5ecfd54f8f87e2

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
run: ./gradlew codeCoverageReport
161161

162162
- name: Send code coverage report to Codecov.io
163-
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
163+
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
164164
with:
165165
token: ${{ secrets.CODECOV_TOKEN }}
166166
docs:

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
# Initializes the CodeQL tools for scanning.
5656
- name: Initialize CodeQL
57-
uses: github/codeql-action/init@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1
57+
uses: github/codeql-action/init@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3.36.0
5858
with:
5959
languages: ${{ matrix.language }}
6060
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
6868
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
6969
# If this step fails, then you should remove it and run the build manually (see below)
7070
- name: Autobuild
71-
uses: github/codeql-action/autobuild@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1
71+
uses: github/codeql-action/autobuild@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3.36.0
7272

7373
# ℹ️ Command-line programs to run using the OS shell.
7474
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -81,6 +81,6 @@ jobs:
8181
# ./location_of_script_within_repo/buildscript.sh
8282

8383
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1
84+
uses: github/codeql-action/analyze@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3.36.0
8585
with:
8686
category: "/language:${{matrix.language}}"

.github/workflows/release-fix.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
on:
2+
workflow_dispatch:
3+
inputs:
4+
version:
5+
description: 'SDK version'
6+
required: true
7+
8+
name: ReleaseFix
9+
10+
# Declare default permissions as read only.
11+
permissions: read-all
12+
13+
jobs:
14+
update_readme:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
# Get GitHub token via the CT SDKs App
19+
- name: Generate GitHub token (via CT SDKs App)
20+
id: generate_github_token
21+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2
22+
with:
23+
app-id: ${{ secrets.CT_SDKS_APP_ID }}
24+
private-key: ${{ secrets.CT_SDKS_APP_PEM }}
25+
26+
- name: Get App user
27+
id: get_app_user
28+
env:
29+
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
30+
run: |
31+
export GH_APP_USER=`gh api /users/ct-sdks%5Bbot%5D | jq .id`
32+
echo "email=${GH_APP_USER}+ct-sdks[bot]@users.noreply.github.com" >> "$GITHUB_OUTPUT"
33+
34+
- name: Checkout
35+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
36+
with:
37+
ref: main
38+
token: ${{ steps.generate_github_token.outputs.token }}
39+
40+
- uses: gradle/actions/wrapper-validation@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
41+
42+
- run: ./gradlew -Pversion=$VERSION writeVersionToExamples writeVersionToReadme setVersion nextMinorVersion snapshotVersion
43+
env:
44+
VERSION: ${{ github.event.inputs.version }}
45+
46+
- name: "Switch SDK to after release branch"
47+
run: |
48+
git fetch --depth=1 origin after-release || true
49+
git checkout -B after-release origin/after-release || true
50+
git checkout -B after-release
51+
git log -1
52+
53+
- name: "update changelog"
54+
run: |
55+
gh api /repos/commercetools/commercetools-sdk-java-v2/releases --paginate > releases.json
56+
node scripts/changelog.js > CHANGELOG.md
57+
rm -rf releases.json
58+
env:
59+
GH_TOKEN: ${{ steps.generate_github_token.outputs.token }}
60+
61+
- name: "remove API reference commit SHA"
62+
run: rm -rf reference.txt
63+
continue-on-error: true
64+
65+
- uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
66+
with:
67+
branch: after-release
68+
commit_message: "TASK: Updating version in README"
69+
commit_author: ct-sdks[bot] <${{ steps.get_app_user.outputs.email }}>
70+
commit_user_name: ct-sdks[bot]
71+
commit_user_email: ${{ steps.get_app_user.outputs.email }}
72+
73+
docs:
74+
name: Build and release docs
75+
76+
runs-on: ubuntu-latest
77+
steps:
78+
# Get GitHub token via the CT SDKs App
79+
- name: Generate GitHub token (via CT SDKs App)
80+
id: generate_github_token
81+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2
82+
with:
83+
app-id: ${{ secrets.CT_SDKS_APP_ID }}
84+
private-key: ${{ secrets.CT_SDKS_APP_PEM }}
85+
86+
- name: Get App user
87+
id: get_app_user
88+
env:
89+
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
90+
run: |
91+
export GH_APP_USER=`gh api /users/ct-sdks%5Bbot%5D | jq .id`
92+
echo "email=${GH_APP_USER}+ct-sdks[bot]@users.noreply.github.com" >> "$GITHUB_OUTPUT"
93+
94+
- name: Checkout
95+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
96+
with:
97+
path: sdk
98+
token: ${{ steps.generate_github_token.outputs.token }}
99+
100+
- name: Checkout
101+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
102+
with:
103+
path: doc
104+
ref: gh-pages
105+
token: ${{ steps.generate_github_token.outputs.token }}
106+
107+
- name: Setup Java
108+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
109+
with:
110+
distribution: 'temurin'
111+
java-version: '17'
112+
113+
- name: Setup Graphviz
114+
uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2
115+
116+
- run: ./gradlew -Pversion=$VERSION alljavadoc
117+
working-directory: sdk
118+
env:
119+
VERSION: ${{ github.event.inputs.version }}
120+
121+
122+
- run: rsync -r sdk/build/docs/javadoc/ doc/javadoc
123+
124+
- uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
125+
with:
126+
repository: doc
127+
commit_message: "Update javadoc"
128+
commit_author: ct-sdks[bot] <${{ steps.get_app_user.outputs.email }}>
129+
commit_user_name: ct-sdks[bot]
130+
commit_user_email: ${{ steps.get_app_user.outputs.email }}

.github/workflows/semgrep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Run Semgrep
3737
run: semgrep scan --sarif --output=semgrep.sarif --config=p/auto --config=p/dockerfile --config=p/typescript --config=p/javascript --config=p/java --metrics=off --verbose
3838
- name: Upload SARIF file for GitHub Advanced Security Dashboard
39-
uses: github/codeql-action/upload-sarif@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1
39+
uses: github/codeql-action/upload-sarif@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3.36.0
4040
with:
4141
sarif_file: semgrep.sarif
4242
if: always()

0 commit comments

Comments
 (0)