Skip to content

Commit 5a6598d

Browse files
authored
Merge branch 'main' into feat/add-chopper-requester-package
2 parents 40cf261 + cedcb2c commit 5a6598d

File tree

267 files changed

+3464
-1620
lines changed

Some content is hidden

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

267 files changed

+3464
-1620
lines changed

.github/workflows/check.yml

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,24 @@ concurrency:
1818
# ACTIONS_RUNNER_DEBUG: true
1919

2020
jobs:
21+
notification:
22+
runs-on: ubuntu-22.04
23+
timeout-minutes: 1
24+
if: ${{ !github.event.pull_request.head.repo.fork && github.event.number }}
25+
permissions:
26+
pull-requests: write
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: marocchino/sticky-pull-request-comment@v2
31+
with:
32+
message: |
33+
### 🔨 The generated code will be pushed at the end of the CI.
34+
35+
Action triggered by commit `${{ github.sha}}`.
36+
37+
_Please do not push any generated code to this pull request._
38+
2139
setup:
2240
runs-on: ubuntu-22.04
2341
timeout-minutes: 10
@@ -99,6 +117,8 @@ jobs:
99117
SWIFT_DATA: ${{ steps.gen-matrix.outputs.SWIFT_DATA }}
100118
RUN_MACOS_SWIFT_CTS: ${{ steps.gen-matrix.outputs.RUN_MACOS_SWIFT_CTS }}
101119

120+
RUN_MACOS_KOTLIN_BUILD: ${{ steps.gen-matrix.outputs.RUN_MACOS_KOTLIN_BUILD }}
121+
102122
scripts:
103123
runs-on: ubuntu-22.04
104124
timeout-minutes: 10
@@ -320,6 +340,35 @@ jobs:
320340
name: clients-${{matrix.client.language }}
321341
path: clients-${{matrix.client.language }}.zip
322342

343+
kotlin_build_macos:
344+
timeout-minutes: 10
345+
runs-on: macos-latest
346+
needs:
347+
- setup
348+
- client_gen
349+
if: |
350+
always() &&
351+
needs.setup.outputs.RUN_MACOS_KOTLIN_BUILD == 'true' &&
352+
!contains(needs.*.result, 'cancelled') &&
353+
!contains(needs.*.result, 'failure')
354+
steps:
355+
- uses: actions/checkout@v4
356+
357+
- name: Download artifacts
358+
uses: ./scripts/ci/actions/restore-artifacts
359+
with:
360+
type: languages
361+
languages: |
362+
kotlin
363+
364+
- name: Setup
365+
uses: ./.github/actions/setup
366+
with:
367+
type: minimal
368+
language: kotlin
369+
370+
- run: yarn cli build clients kotlin
371+
323372
swift_cts_macos:
324373
timeout-minutes: 20
325374
runs-on: macos-latest
@@ -353,8 +402,7 @@ jobs:
353402
type: minimal
354403
language: swift
355404

356-
- name: Run CTS
357-
run: yarn cli cts run swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }}
405+
- run: yarn cli cts run swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }}
358406

359407
codegen:
360408
runs-on: ubuntu-22.04
@@ -364,11 +412,13 @@ jobs:
364412
- client_gen
365413
- client_gen_javascript
366414
- swift_cts_macos
415+
- kotlin_build_macos
367416
if: |
368417
always() &&
369-
(needs.swift_cts_macos.result == 'success' || needs.swift_cts_macos.result == 'skipped') &&
370418
!contains(needs.*.result, 'cancelled') &&
371419
!contains(needs.*.result, 'failure')
420+
permissions:
421+
pull-requests: write
372422
outputs:
373423
success: ${{ steps.setoutput.outputs.success }}
374424
steps:
@@ -377,6 +427,7 @@ jobs:
377427
fetch-depth: 0
378428
ref: ${{ github.event.pull_request.head.ref }}
379429
token: ${{ secrets.ALGOLIA_BOT_TOKEN }}
430+
repository: ${{ github.event.pull_request.head.repo.full_name }}
380431

381432
- name: Download all artifacts
382433
uses: ./scripts/ci/actions/restore-artifacts
@@ -419,6 +470,17 @@ jobs:
419470
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}
420471
PR_NUMBER: ${{ github.event.number }}
421472

473+
- name: update generation comment
474+
uses: marocchino/sticky-pull-request-comment@v2
475+
with:
476+
message: |
477+
### ✔️ Code generated!
478+
479+
| Name | Link |
480+
|---------------------------------|------------------------|
481+
| 🔨 Triggered by | [`${{ github.sha }}`](${{ github.pull_request.html_url }}/commits/${{ github.sha }}) |
482+
| 🌲 Generated branch | [`generated/${{ github.head_ref }}`](${{ github.pull_request.base.repo.html_url }}/tree/generated/${{ github.head_ref }}) |
483+
422484
- name: Spread generation to each repository
423485
id: spreadGeneration
424486
if: github.ref == 'refs/heads/main'

.github/workflows/cleanup.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Cleanup generated branch
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
cleanup:
9+
runs-on: ubuntu-22.04
10+
timeout-minutes: 10
11+
permissions:
12+
pull-requests: write
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- run: git push -d origin generated/${{ github.head_ref }} || true

.github/workflows/codegen.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

clients/algoliasearch-client-csharp/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [7.0.0-beta.8](https://github.com/algolia/algoliasearch-client-csharp/compare/7.0.0-beta.7...7.0.0-beta.8)
2+
3+
- [9776cb3ba](https://github.com/algolia/api-clients-automation/commit/9776cb3ba) feat(specs): add redirect to renderingContent ([#3296](https://github.com/algolia/api-clients-automation/pull/3296)) by [@shortcuts](https://github.com/shortcuts/)
4+
15
## [7.0.0-beta.7](https://github.com/algolia/algoliasearch-client-csharp/compare/7.0.0-beta.6...7.0.0-beta.7)
26

37
- [8e98407c1](https://github.com/algolia/api-clients-automation/commit/8e98407c1) fix(clients): update ingestion transformations description and fix taggroups ([#3265](https://github.com/algolia/api-clients-automation/pull/3265)) by [@shortcuts](https://github.com/shortcuts/)

clients/algoliasearch-client-csharp/algoliasearch/Algolia.Search.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<RepositoryType>git</RepositoryType>
2222
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
2323
<Copyright>Copyright 2019 Algolia</Copyright>
24-
<Version>7.0.0-beta.7</Version>
24+
<Version>7.0.0-beta.8</Version>
2525
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2626
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
2727
<IncludeSymbols>true</IncludeSymbols>

clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Redirect.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Algolia.Search.Models.Recommend;
1313

1414
/// <summary>
15-
/// [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/).
15+
/// [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.
1616
/// </summary>
1717
public partial class Redirect
1818
{
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
//
2+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Recommend;
13+
14+
/// <summary>
15+
/// The redirect rule container.
16+
/// </summary>
17+
public partial class RedirectURL
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the RedirectURL class.
21+
/// </summary>
22+
public RedirectURL()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Gets or Sets Url
28+
/// </summary>
29+
[JsonPropertyName("url")]
30+
public string Url { get; set; }
31+
32+
/// <summary>
33+
/// Returns the string presentation of the object
34+
/// </summary>
35+
/// <returns>String presentation of the object</returns>
36+
public override string ToString()
37+
{
38+
StringBuilder sb = new StringBuilder();
39+
sb.Append("class RedirectURL {\n");
40+
sb.Append(" Url: ").Append(Url).Append("\n");
41+
sb.Append("}\n");
42+
return sb.ToString();
43+
}
44+
45+
/// <summary>
46+
/// Returns the JSON string presentation of the object
47+
/// </summary>
48+
/// <returns>JSON string presentation of the object</returns>
49+
public virtual string ToJson()
50+
{
51+
return JsonSerializer.Serialize(this, JsonConfig.Options);
52+
}
53+
54+
/// <summary>
55+
/// Returns true if objects are equal
56+
/// </summary>
57+
/// <param name="obj">Object to be compared</param>
58+
/// <returns>Boolean</returns>
59+
public override bool Equals(object obj)
60+
{
61+
if (obj is not RedirectURL input)
62+
{
63+
return false;
64+
}
65+
66+
return
67+
(Url == input.Url || (Url != null && Url.Equals(input.Url)));
68+
}
69+
70+
/// <summary>
71+
/// Gets the hash code
72+
/// </summary>
73+
/// <returns>Hash code</returns>
74+
public override int GetHashCode()
75+
{
76+
unchecked // Overflow is fine, just wrap
77+
{
78+
int hashCode = 41;
79+
if (Url != null)
80+
{
81+
hashCode = (hashCode * 59) + Url.GetHashCode();
82+
}
83+
return hashCode;
84+
}
85+
}
86+
87+
}
88+

clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RenderingContent.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ public RenderingContent()
2929
[JsonPropertyName("facetOrdering")]
3030
public FacetOrdering FacetOrdering { get; set; }
3131

32+
/// <summary>
33+
/// Gets or Sets Redirect
34+
/// </summary>
35+
[JsonPropertyName("redirect")]
36+
public RedirectURL Redirect { get; set; }
37+
3238
/// <summary>
3339
/// Returns the string presentation of the object
3440
/// </summary>
@@ -38,6 +44,7 @@ public override string ToString()
3844
StringBuilder sb = new StringBuilder();
3945
sb.Append("class RenderingContent {\n");
4046
sb.Append(" FacetOrdering: ").Append(FacetOrdering).Append("\n");
47+
sb.Append(" Redirect: ").Append(Redirect).Append("\n");
4148
sb.Append("}\n");
4249
return sb.ToString();
4350
}
@@ -64,7 +71,8 @@ public override bool Equals(object obj)
6471
}
6572

6673
return
67-
(FacetOrdering == input.FacetOrdering || (FacetOrdering != null && FacetOrdering.Equals(input.FacetOrdering)));
74+
(FacetOrdering == input.FacetOrdering || (FacetOrdering != null && FacetOrdering.Equals(input.FacetOrdering))) &&
75+
(Redirect == input.Redirect || (Redirect != null && Redirect.Equals(input.Redirect)));
6876
}
6977

7078
/// <summary>
@@ -80,6 +88,10 @@ public override int GetHashCode()
8088
{
8189
hashCode = (hashCode * 59) + FacetOrdering.GetHashCode();
8290
}
91+
if (Redirect != null)
92+
{
93+
hashCode = (hashCode * 59) + Redirect.GetHashCode();
94+
}
8395
return hashCode;
8496
}
8597
}

clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Redirect.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Algolia.Search.Models.Search;
1313

1414
/// <summary>
15-
/// [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/).
15+
/// [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.
1616
/// </summary>
1717
public partial class Redirect
1818
{

0 commit comments

Comments
 (0)