From 14910dac539d7b3c06793a17dfc00c743805199d Mon Sep 17 00:00:00 2001 From: Kai Welke Date: Wed, 25 Sep 2024 18:07:16 +0200 Subject: [PATCH 1/3] fix(specs): do not expose internal URL in the public spec (#3835) --- specs/crawler/spec.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/specs/crawler/spec.yml b/specs/crawler/spec.yml index 2907930d2e..71f52ee7aa 100644 --- a/specs/crawler/spec.yml +++ b/specs/crawler/spec.yml @@ -59,9 +59,7 @@ components: scheme: basic servers: - url: https://crawler.algolia.com/api - description: The main URL of the Crawler API. - - url: https://crawler-dev.algolia.com/api - description: The URL of the development version of the Crawler API (Algolia employees only). + description: The URL of the Crawler API. security: - BasicAuth: [] tags: From 2b4d3103894735348871b2457d46e84ccab770ad Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Wed, 25 Sep 2024 16:20:57 +0000 Subject: [PATCH 2/3] fix(specs): do not expose internal URL in the public spec (#3835) (generated) [skip ci] Co-authored-by: Kai Welke --- specs/bundled/crawler.doc.yml | 6 +----- specs/bundled/crawler.yml | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/specs/bundled/crawler.doc.yml b/specs/bundled/crawler.doc.yml index 481f5fcae2..d25c209be6 100644 --- a/specs/bundled/crawler.doc.yml +++ b/specs/bundled/crawler.doc.yml @@ -88,11 +88,7 @@ info: version: 1.0.0 servers: - url: https://crawler.algolia.com/api - description: The main URL of the Crawler API. - - url: https://crawler-dev.algolia.com/api - description: >- - The URL of the development version of the Crawler API (Algolia employees - only). + description: The URL of the Crawler API. security: - BasicAuth: [] tags: diff --git a/specs/bundled/crawler.yml b/specs/bundled/crawler.yml index daf43c9ede..16227bdf42 100644 --- a/specs/bundled/crawler.yml +++ b/specs/bundled/crawler.yml @@ -88,11 +88,7 @@ info: version: 1.0.0 servers: - url: https://crawler.algolia.com/api - description: The main URL of the Crawler API. - - url: https://crawler-dev.algolia.com/api - description: >- - The URL of the development version of the Crawler API (Algolia employees - only). + description: The URL of the Crawler API. security: - BasicAuth: [] tags: From 8b31d9e4cfd8aed5117fcc5cb13abb1b14fabaa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Wed, 25 Sep 2024 19:07:18 +0200 Subject: [PATCH 3/3] chore(ci): add a workflow to push to Algolia doc (#3833) --- .eslintrc.cjs | 8 ++++++++ .github/workflows/push-to-algolia-doc.yml | 24 +++++++++++++++++++++++ .github/workflows/renovate.yml | 4 ---- .github/workflows/scheduled-release.yml | 4 ---- scripts/ci/codegen/pushToAlgoliaDoc.ts | 2 +- 5 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/push-to-algolia-doc.yml diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 95dc953d7a..591c686364 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -71,6 +71,14 @@ module.exports = { }, ], }, + { + // actions yml linter + files: ['.github/**/*.yml'], + + rules: { + 'yml/no-empty-mapping-value': 0, + }, + }, { // es linter files: ['*.ts', '*.js'], diff --git a/.github/workflows/push-to-algolia-doc.yml b/.github/workflows/push-to-algolia-doc.yml new file mode 100644 index 0000000000..a80b74152f --- /dev/null +++ b/.github/workflows/push-to-algolia-doc.yml @@ -0,0 +1,24 @@ +name: Push specs and snippets to Algolia doc + +on: workflow_dispatch + +jobs: + release: + name: Scheduled Release + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: main + + - name: Setup + id: setup + uses: ./.github/actions/setup + with: + type: minimal + + - run: yarn workspace scripts pushToAlgoliaDoc + env: + GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }} + FORCE: true diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 28e989be92..88c8343f74 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -4,10 +4,6 @@ on: schedule: - cron: '0 14 * * 5' # At 14:00 on Friday. workflow_dispatch: - inputs: - fake_input: - description: input needed to satisfy the yaml linter - required: false jobs: renovate: diff --git a/.github/workflows/scheduled-release.yml b/.github/workflows/scheduled-release.yml index 6a54c2e4e9..5c9019d607 100644 --- a/.github/workflows/scheduled-release.yml +++ b/.github/workflows/scheduled-release.yml @@ -4,10 +4,6 @@ on: schedule: - cron: '30 6 * * 2' workflow_dispatch: - inputs: - fake_input: - description: input needed to satisfy the yaml linter - required: false jobs: release: diff --git a/scripts/ci/codegen/pushToAlgoliaDoc.ts b/scripts/ci/codegen/pushToAlgoliaDoc.ts index 52808a8835..781b0f13d9 100644 --- a/scripts/ci/codegen/pushToAlgoliaDoc.ts +++ b/scripts/ci/codegen/pushToAlgoliaDoc.ts @@ -28,7 +28,7 @@ async function pushToAlgoliaDoc(): Promise { .map((coAuthor) => coAuthor.trim()) .filter(Boolean); - if (!process.env.DRY_RUN && !lastCommitMessage.startsWith(commitStartRelease)) { + if (!process.env.FORCE && !lastCommitMessage.startsWith(commitStartRelease)) { return; }