Skip to content

Commit 07f94d5

Browse files
authored
Merge branch 'main' into chore/python-typing-improved
2 parents 1275cfe + 6bfeb5a commit 07f94d5

File tree

3 files changed

+35
-14
lines changed

3 files changed

+35
-14
lines changed

.github/workflows/check.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ jobs:
2121
notification:
2222
runs-on: ubuntu-22.04
2323
timeout-minutes: 1
24-
if: ${{ !github.event.pull_request.head.repo.fork && github.event.number }}
24+
if: ${{ github.event.number }}
2525
permissions:
2626
pull-requests: write
27+
issues: write
2728
steps:
2829
- uses: actions/checkout@v4
2930

3031
- uses: marocchino/sticky-pull-request-comment@v2
3132
with:
32-
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}
33+
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
3334
message: |
3435
### 🪓 The generated code will be pushed at the end of the CI.
3536
@@ -265,11 +266,11 @@ jobs:
265266
- name: Run e2e CTS
266267
id: cts-e2e
267268
continue-on-error: true
268-
if: ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
269+
if: ${{ env.ALGOLIA_APPLICATION_ID != '' && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
269270
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
270271

271272
- name: Retry e2e CTS
272-
if: ${{ !github.event.pull_request.head.repo.fork && steps.cts-e2e.outcome == 'failure' }}
273+
if: ${{ steps.cts-e2e.outcome == 'failure' }}
273274
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
274275

275276
- name: Run benchmarks
@@ -379,11 +380,11 @@ jobs:
379380
- name: Run e2e CTS
380381
id: cts-e2e
381382
continue-on-error: true
382-
if: ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
383+
if: ${{ env.ALGOLIA_APPLICATION_ID != '' && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
383384
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
384385

385386
- name: Retry e2e CTS
386-
if: ${{ !github.event.pull_request.head.repo.fork && steps.cts-e2e.outcome == 'failure' }}
387+
if: ${{ steps.cts-e2e.outcome == 'failure' }}
387388
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
388389

389390
- name: Run benchmarks
@@ -479,22 +480,26 @@ jobs:
479480
name: client swift${{ needs.setup.outputs.RUN_MACOS_SWIFT_CTS == 'true' && format('@{0}', fromJSON(needs.setup.outputs.SWIFT_DATA).version) || '' }} macos
480481
steps:
481482
- uses: actions/checkout@v4
483+
if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
482484

483485
- name: Download artifacts
486+
if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
484487
uses: ./scripts/ci/actions/restore-artifacts
485488
with:
486489
type: languages
487490
languages: |
488491
swift
489492
490493
- name: Setup
494+
if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
491495
uses: ./.github/actions/setup
492496
with:
493497
type: minimal
494498
language: swift
495499
version: ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).version }}
496500

497501
- name: Run tests on macOS
502+
if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
498503
id: run-test
499504
continue-on-error: true
500505
run: yarn cli cts run swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }} -v ${{ !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') && '--no-e2e' || '' }}
@@ -528,8 +533,7 @@ jobs:
528533
with:
529534
fetch-depth: 0
530535
ref: ${{ github.event.pull_request.head.ref }}
531-
token: ${{ secrets.ALGOLIA_BOT_TOKEN }}
532-
repository: ${{ github.event.pull_request.head.repo.full_name }}
536+
token: ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
533537

534538
- name: Download all artifacts
535539
uses: ./scripts/ci/actions/restore-artifacts
@@ -572,14 +576,14 @@ jobs:
572576
id: pushGeneratedCode
573577
run: yarn workspace scripts pushGeneratedCode
574578
env:
575-
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}
579+
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
576580
PR_NUMBER: ${{ github.event.number }}
577581

578582
- name: update generation comment
579583
uses: marocchino/sticky-pull-request-comment@v2
580584
if: ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT == '' }}
581585
with:
582-
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}
586+
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
583587
message: |
584588
### No code generated
585589
@@ -591,7 +595,7 @@ jobs:
591595
uses: marocchino/sticky-pull-request-comment@v2
592596
if: ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT != '' }}
593597
with:
594-
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}
598+
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
595599
message: |
596600
### ✔️ Code generated!
597601
@@ -660,9 +664,8 @@ jobs:
660664
- uses: actions/checkout@v4
661665
with:
662666
fetch-depth: 0
663-
ref: ${{ needs.codegen.outputs.generatedCommit }}
667+
ref: ${{ github.event.pull_request.head.ref }}
664668
token: ${{ secrets.ALGOLIA_BOT_TOKEN }}
665-
repository: ${{ github.event.pull_request.head.repo.full_name }}
666669

667670
- name: Setup
668671
uses: ./.github/actions/setup

generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public class AlgoliaSwiftGenerator extends Swift5ClientCodegen {
3838
"aroundradiusall",
3939
"automaticfacetfilter",
4040
"automaticfacetfilters",
41+
"banner",
42+
"bannerimage",
43+
"bannerimageurl",
44+
"bannerlink",
45+
"banners",
4146
"baseindexsettings",
4247
"basesearchparams",
4348
"basesearchparamswithoutquery",
@@ -109,7 +114,8 @@ public class AlgoliaSwiftGenerator extends Swift5ClientCodegen {
109114
"timerange",
110115
"typotolerance",
111116
"typotoleranceenum",
112-
"value"
117+
"value",
118+
"widgets"
113119
);
114120

115121
// This is used for the CTS generation

templates/javascript/clients/algoliasearch/builds/models.mustache

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ import type {
1313
AroundRadiusAll,
1414
AutomaticFacetFilter,
1515
AutomaticFacetFilters,
16+
Banner,
17+
BannerImage,
18+
BannerImageUrl,
19+
BannerLink,
20+
Banners,
1621
BaseIndexSettings,
1722
BaseSearchParams,
1823
BaseSearchParamsWithoutQuery,
@@ -79,6 +84,7 @@ import type {
7984
TypoTolerance,
8085
TypoToleranceEnum,
8186
Value,
87+
Widgets,
8288
} from '@algolia/client-search';
8389
import { apiClientVersion } from '@algolia/client-search';
8490
import type { RecommendClient } from '@algolia/recommend';
@@ -103,6 +109,11 @@ export {
103109
AroundRadiusAll,
104110
AutomaticFacetFilter,
105111
AutomaticFacetFilters,
112+
Banner,
113+
BannerImage,
114+
BannerImageUrl,
115+
BannerLink,
116+
Banners,
106117
BaseIndexSettings,
107118
BaseSearchParams,
108119
BaseSearchParamsWithoutQuery,
@@ -170,6 +181,7 @@ export {
170181
TypoTolerance,
171182
TypoToleranceEnum,
172183
Value,
184+
Widgets,
173185
};
174186

175187
/**

0 commit comments

Comments
 (0)