Skip to content

CI: create issues without requiring the 'dependencies' label - #245

Merged
codeling merged 1 commit into
mainfrom
joomla-versions-optional-label
Oct 27, 2026
Merged

codeling merged 1 commit into
mainfrom
joomla-versions-optional-label

Conversation

@codeling

Copy link
Copy Markdown
Owner

Problem

The first scheduled run of joomla-versions.yml (run 40492310745) got as far as the plan, which was correct against the real API:

  • 5.4.8 -> 5.4.10 and 6.1.3 -> 6.1.4 (bumps), and a new line 6.2 (6.2.0)

then failed at gh issue create ... --label dependencies: could not add label: 'dependencies' not found. The repository has no such label. I had made the label optional for the pull request (gh pr edit --add-label ... || true) but not for the issue, my mistake. As the issue step failed, the pull request step never ran: no issue and no PR were created.

Change

  • joomla-versions.yml: the issue is created without --label; the label is added afterwards (gh issue edit "$url" --add-label dependencies || true), so a missing label no longer matters.
  • joomla-versions.yml: the pull request step has if: ${{ !cancelled() }}, so a failing issue step can't suppress the PR (the job still reports the failure).
  • dependencies.yml: the same --label dependencies in its "Open an issue" step would have failed identically the first time the GeoIP check fails; same fix.

No issue was created by the failed run (gh validates labels before creating), so the re-run won't duplicate anything.

Tested

The two issue steps, extracted from the workflows, run with a fake gh that rejects --label and fails issue edit like GitHub does for a missing label: both exit 0, the issue is created without the label, the label edit is attempted and its failure ignored. YAML parses; the workflow pin lint passes.

After merging

Run "Joomla versions" once more (Actions -> Run workflow). It should open an issue for 6.2, and a pull request joomla-versions for 5.4.10 / 6.1.4 (needs "Allow GitHub Actions to create and approve pull requests"). Creating a dependencies label in the repository is optional: if it exists, the issues and the PR get it.


Generated by Claude Code

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhhhdjhErC9ZiaS4HyRjsh
@codeling
codeling merged commit 7b75113 into main Oct 27, 2026
9 checks passed
@codeling
codeling deleted the joomla-versions-optional-label branch October 27, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant