From 871f43df1b5f3008a75f3b67db97c1f3a9881200 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2025 09:42:00 +0100 Subject: [PATCH 1/8] Green CI? Signed-off-by: Joas Schilling --- .github/workflows/template.hbs | 5 +++++ .github/workflows/test-repositories.yml | 21 ++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/template.hbs diff --git a/.github/workflows/template.hbs b/.github/workflows/template.hbs new file mode 100644 index 0000000..740dc9a --- /dev/null +++ b/.github/workflows/template.hbs @@ -0,0 +1,5 @@ +# Create a Custom Summary! + +| **Tests 📝** | **Passed ✅** | **Failed ❌** | **Skipped ⏭️** | **Pending ⏳** | **Other ❓** | **Flaky 🍂** | **Duration ⏱️** | +| --- | --- | --- | --- | --- | --- | --- | --- | +|{{data.results.summary.tests}}|{{data.results.summary.passed}}|{{data.results.summary.failed}}|{{data.results.summary.skipped}}|{{data.results.summary.pending}}|{{data.results.summary.other}}|{{data.results.summary.start}}|{{data.results.summary.stop}}| diff --git a/.github/workflows/test-repositories.yml b/.github/workflows/test-repositories.yml index 8b29fff..2777b31 100644 --- a/.github/workflows/test-repositories.yml +++ b/.github/workflows/test-repositories.yml @@ -8,13 +8,7 @@ name: Generate OpenAPI in Repositories -on: - pull_request: - push: - branches: - - main - - master - - stable* +on: pull_request permissions: contents: read @@ -85,8 +79,8 @@ jobs: - name: Show changes of the API for assistance working-directory: temp-repository/ run: | - git status - git --no-pager diff + git status + git --no-pager diff summary: permissions: @@ -99,5 +93,10 @@ jobs: name: openapi-repositories-summary steps: - - name: Summary status - run: if ${{ needs.openapi-repositories.result != 'success' && needs.openapi-repositories.result != 'skipped' }}; then exit 1; fi + - name: Generate Markdown Summary + uses: Ma11hewThomas/github-markdown-builder@v1 + with: + template-file-path: './.github/workflows/template.hbs' + pull-request: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b0e1ab248591847b8756ce17407c51d67744fbc4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2025 09:55:52 +0100 Subject: [PATCH 2/8] simplify Signed-off-by: Joas Schilling --- .github/workflows/test-repositories.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/test-repositories.yml b/.github/workflows/test-repositories.yml index 2777b31..40010c6 100644 --- a/.github/workflows/test-repositories.yml +++ b/.github/workflows/test-repositories.yml @@ -25,17 +25,8 @@ jobs: matrix: php-versions: [ "8.1" ] repositories: - - "nextcloud/app_template" - - "nextcloud/assistant" - - "nextcloud/groupfolders" - - "nextcloud/mail" - - "nextcloud/notifications" - - "nextcloud/password_policy" - - "nextcloud/recommendations" - - "nextcloud/server" - "nextcloud/spreed" - "nextcloud/tables" - - "nextcloud/terms_of_service" name: openapi-repositories From 22893498d2a4832900f0e6d83f1454b3b4557c08 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2025 09:57:43 +0100 Subject: [PATCH 3/8] fixup! Green CI? --- .github/workflows/test-repositories.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test-repositories.yml b/.github/workflows/test-repositories.yml index 40010c6..ad01f88 100644 --- a/.github/workflows/test-repositories.yml +++ b/.github/workflows/test-repositories.yml @@ -84,6 +84,9 @@ jobs: name: openapi-repositories-summary steps: + - name: Checkout + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - name: Generate Markdown Summary uses: Ma11hewThomas/github-markdown-builder@v1 with: From b08c728b7ddf230e9dc3cbc8a54b5e6abe31e45e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2025 09:59:54 +0100 Subject: [PATCH 4/8] fixup! fixup! Green CI? --- .github/workflows/test-repositories.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-repositories.yml b/.github/workflows/test-repositories.yml index ad01f88..6d8e85c 100644 --- a/.github/workflows/test-repositories.yml +++ b/.github/workflows/test-repositories.yml @@ -93,4 +93,4 @@ jobs: template-file-path: './.github/workflows/template.hbs' pull-request: true env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} From 9d1934ac4879659fd4a46812a9c7e135a646ec97 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2025 10:21:08 +0100 Subject: [PATCH 5/8] fixup! fixup! fixup! Green CI? --- .github/workflows/template.hbs | 8 +++----- .github/workflows/test-repositories.yml | 15 +-------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/template.hbs b/.github/workflows/template.hbs index 740dc9a..5ca817b 100644 --- a/.github/workflows/template.hbs +++ b/.github/workflows/template.hbs @@ -1,5 +1,3 @@ -# Create a Custom Summary! - -| **Tests 📝** | **Passed ✅** | **Failed ❌** | **Skipped ⏭️** | **Pending ⏳** | **Other ❓** | **Flaky 🍂** | **Duration ⏱️** | -| --- | --- | --- | --- | --- | --- | --- | --- | -|{{data.results.summary.tests}}|{{data.results.summary.passed}}|{{data.results.summary.failed}}|{{data.results.summary.skipped}}|{{data.results.summary.pending}}|{{data.results.summary.other}}|{{data.results.summary.start}}|{{data.results.summary.stop}}| +# {{github.workflow}} ❌ +{{github.serverUrl}} +{{github.buildUrl}} diff --git a/.github/workflows/test-repositories.yml b/.github/workflows/test-repositories.yml index 6d8e85c..405269a 100644 --- a/.github/workflows/test-repositories.yml +++ b/.github/workflows/test-repositories.yml @@ -73,22 +73,9 @@ jobs: git status git --no-pager diff - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: openapi-repositories - - if: always() - - name: openapi-repositories-summary - - steps: - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - name: Generate Markdown Summary uses: Ma11hewThomas/github-markdown-builder@v1 + if: failure() with: template-file-path: './.github/workflows/template.hbs' pull-request: true From 8d374f1bf95cfcd006c29ac984d1ffcf8ef50146 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2025 10:25:30 +0100 Subject: [PATCH 6/8] fixup! fixup! fixup! fixup! Green CI? --- .github/workflows/template.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template.hbs b/.github/workflows/template.hbs index 5ca817b..a1c14fe 100644 --- a/.github/workflows/template.hbs +++ b/.github/workflows/template.hbs @@ -1,3 +1,3 @@ -# {{github.workflow}} ❌ +# {{github.job}} ❌ {{github.serverUrl}} {{github.buildUrl}} From 0523f9ea87e5d5f88a05ca1de8e8f460c6f3f56b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2025 10:29:28 +0100 Subject: [PATCH 7/8] fixup! fixup! fixup! fixup! fixup! Green CI? --- .github/workflows/template.hbs | 4 +--- .github/workflows/test-repositories.yml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/template.hbs b/.github/workflows/template.hbs index a1c14fe..78d9486 100644 --- a/.github/workflows/template.hbs +++ b/.github/workflows/template.hbs @@ -1,3 +1 @@ -# {{github.job}} ❌ -{{github.serverUrl}} -{{github.buildUrl}} +[❌ {{github.job}} failed]({{github.buildUrl}}) diff --git a/.github/workflows/test-repositories.yml b/.github/workflows/test-repositories.yml index 405269a..4d36ebc 100644 --- a/.github/workflows/test-repositories.yml +++ b/.github/workflows/test-repositories.yml @@ -28,7 +28,7 @@ jobs: - "nextcloud/spreed" - "nextcloud/tables" - name: openapi-repositories + name: ${{ matrix.repositories }} steps: - name: Checkout From 491047f3581e7e4a3d3dac47f0b723978fb22832 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 4 Mar 2025 10:38:42 +0100 Subject: [PATCH 8/8] fixup! fixup! fixup! fixup! fixup! fixup! Green CI? --- .github/workflows/test-repositories.yml | 9 +++++++++ REUSE.toml | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/test-repositories.yml b/.github/workflows/test-repositories.yml index 4d36ebc..6316682 100644 --- a/.github/workflows/test-repositories.yml +++ b/.github/workflows/test-repositories.yml @@ -25,8 +25,17 @@ jobs: matrix: php-versions: [ "8.1" ] repositories: + - "nextcloud/app_template" + - "nextcloud/assistant" + - "nextcloud/groupfolders" + - "nextcloud/mail" + - "nextcloud/notifications" + - "nextcloud/password_policy" + - "nextcloud/recommendations" + - "nextcloud/server" - "nextcloud/spreed" - "nextcloud/tables" + - "nextcloud/terms_of_service" name: ${{ matrix.repositories }} diff --git a/REUSE.toml b/REUSE.toml index d1be7ce..f16f519 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -22,3 +22,9 @@ path = ["tests/openapi-administration.json", "tests/openapi-ex_app.json", "tests precedence = "aggregate" SPDX-FileCopyrightText = "2024 Nextcloud GmbH and Nextcloud contributors" SPDX-License-Identifier = "AGPL-3.0-or-later" + +[[annotations]] +path = [".github/workflows/template.hbs"] +precedence = "aggregate" +SPDX-FileCopyrightText = "2025 Nextcloud GmbH and Nextcloud contributors" +SPDX-License-Identifier = "AGPL-3.0-or-later"