Repository navigation
CI: create issues without requiring the 'dependencies' label - #245
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The first scheduled run of
joomla-versions.yml(run 40492310745) got as far as the plan, which was correct against the real API: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 hasif: ${{ !cancelled() }}, so a failing issue step can't suppress the PR (the job still reports the failure).dependencies.yml: the same--label dependenciesin 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 (
ghvalidates labels before creating), so the re-run won't duplicate anything.Tested
The two issue steps, extracted from the workflows, run with a fake
ghthat rejects--labeland failsissue editlike 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-versionsfor 5.4.10 / 6.1.4 (needs "Allow GitHub Actions to create and approve pull requests"). Creating adependencieslabel in the repository is optional: if it exists, the issues and the PR get it.Generated by Claude Code