From 323b0bd8535f812da7332afd916aa323f0e6d79d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 20 Jun 2024 20:14:31 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A7=AA=20Make=20a=20draft=20based=20p?= =?UTF-8?q?lugin=20bump=20PR=20CI=20trigger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Normally, PRs/commits published using the default GitHub Actions CI/CD API token are not propagated to any integrations. This patch marks the plugin update PR as a draft and leaves a comment asking the maintainers to mark it as ready for review in order to actually trigger a CI run. This idea is found in GitHub's own repos: * https://github.com/github/codeql-action/pull/2263#issuecomment-2078311173 * https://github.com/github/codeql-action/blob/4ebadbc7/.github/workflows/update-dependencies.yml#L38-L41 * https://github.com/github/codeql-action/pull/1868 * https://github.com/github/codeql-action/pull/679 --- .github/workflows/test.yml | 5 +++++ .github/workflows/update-plugin-list.yml | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d16ce0edf..adc03a8c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,11 @@ on: branches: - main - "[0-9]+.[0-9]+.x" + types: + - opened # default + - synchronize # default + - reopened # default + - ready_for_review # used in PRs created from the release workflow env: PYTEST_ADDOPTS: "--color=yes" diff --git a/.github/workflows/update-plugin-list.yml b/.github/workflows/update-plugin-list.yml index 1015d01c9..4da55e6d5 100644 --- a/.github/workflows/update-plugin-list.yml +++ b/.github/workflows/update-plugin-list.yml @@ -46,6 +46,7 @@ jobs: run: python scripts/update-plugin-list.py - name: Create Pull Request + id: pr uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e with: commit-message: '[automated] Update plugin list' @@ -55,3 +56,13 @@ jobs: branch-suffix: short-commit-hash title: '[automated] Update plugin list' body: '[automated] Update plugin list' + draft: true + + - name: Instruct the maintainers to trigger CI by undrafting the PR + env: + GITHUB_TOKEN: ${{ github.token }} + run: >- + gh pr comment + --body 'Please mark the PR as ready for review to trigger PR checks.' + --repo '${{ github.repository }}' + '${{ steps.pr.outputs.pull-request-number }}' From 072cb5250e23073deb2c0bbe94419810e605e54f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 20 Jun 2024 20:22:29 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20Add=20a=20change=20note=20fo?= =?UTF-8?q?r=20PR=20#12502?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog/12502.contrib.rst | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 changelog/12502.contrib.rst diff --git a/changelog/12502.contrib.rst b/changelog/12502.contrib.rst new file mode 100644 index 000000000..a7db42252 --- /dev/null +++ b/changelog/12502.contrib.rst @@ -0,0 +1,7 @@ +The UX of the GitHub automation making pull requests to update the +plugin list has been updated. Previously, the maintainers had to close +the automatically created pull requests and re-open them to trigger the +CI runs. From now on, they only need to click the `Ready for review` +button instead. + +-- by :user:`webknjaz`.