From 7bb9c7852e1a3ac6f95f7ad2aa8ece265607df35 Mon Sep 17 00:00:00 2001 From: Bernhard Froehler Date: Tue, 27 Oct 2026 15:46:27 +0000 Subject: [PATCH] CI: create issues without requiring the 'dependencies' label The first scheduled run of joomla-versions.yml found newer Joomla releases but failed at `gh issue create --label dependencies`: the repository has no such label ("could not add label: 'dependencies' not found"), so no issue and, because the step failed, no pull request was created either. - the issue is created without the label; the label is added afterwards and a failure to do so is ignored (same for the issue of dependencies.yml, which would have hit the same error) - the pull request step runs even if the issue step failed Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01LhhhdjhErC9ZiaS4HyRjsh --- .github/workflows/dependencies.yml | 6 ++++-- .github/workflows/joomla-versions.yml | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 5c4d057..f692d6a 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -38,6 +38,8 @@ jobs: run: | title="Update the vendored GeoIP reader (maxmind-db/reader)" if [ -z "$(gh issue list --state open --search "in:title $title" --json number --jq '.[0].number')" ]; then - gh issue create --title "$title" --label dependencies \ - --body "The weekly dependency check failed: maxmind-db/reader has a newer release, a security advisory, or src/Helper/Geo differs from composer.lock. See the run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID. To update: \`composer update maxmind-db/reader && composer vendor-geoip\`, review the diff, run the tests, release both extensions." + url="$(gh issue create --title "$title" \ + --body "The weekly dependency check failed: maxmind-db/reader has a newer release, a security advisory, or src/Helper/Geo differs from composer.lock. See the run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID. To update: \`composer update maxmind-db/reader && composer vendor-geoip\`, review the diff, run the tests, release both extensions.")" + # the label is a nicety: the repository may not have it + gh issue edit "$url" --add-label dependencies || true fi diff --git a/.github/workflows/joomla-versions.yml b/.github/workflows/joomla-versions.yml index 15eba35..688311c 100644 --- a/.github/workflows/joomla-versions.yml +++ b/.github/workflows/joomla-versions.yml @@ -52,10 +52,14 @@ jobs: known="$(gh issue list --state all --search "in:title Joomla $line" --json number,title \ | jq -r --arg t "$title" 'map(select(.title == $t)) | .[0].number // empty')" if [ -z "$known" ]; then - gh issue create --title "$title" --label dependencies --body "Joomla! $version (line $line) is released and newer than the versions the CI matrix tests. To support it: raise or extend the matrix in \`.github/workflows/ci.yml\` (and in com_bfstop), add the package's SHA-256 to \`tests/ci/joomla-checksums.sha256\` (the file says how to check it), and see what the tests say. Opened by the weekly job $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID; it doesn't ask again for this line." + url="$(gh issue create --title "$title" --body "Joomla! $version (line $line) is released and newer than the versions the CI matrix tests. To support it: raise or extend the matrix in \`.github/workflows/ci.yml\` (and in com_bfstop), add the package's SHA-256 to \`tests/ci/joomla-checksums.sha256\` (the file says how to check it), and see what the tests say. Opened by the weekly job $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID; it doesn't ask again for this line.")" + # the label is a nicety: the repository may not have it + gh issue edit "$url" --add-label dependencies || true fi done < <(jq -c '.new_lines[]' "$RUNNER_TEMP/plan.json") - name: Pull request for newer patch releases + # independent of the issue step: a failing issue must not hide the pull request + if: ${{ !cancelled() }} run: | set -euo pipefail if [ "$(jq '.bumps | length' "$RUNNER_TEMP/plan.json")" -eq 0 ]; then