fix: ensure autopublish labels exist before using them#34
Conversation
The first cron run failed because `gh issue create --label X` errors out when label X doesn't exist (rather than auto-creating it). This blocked both the status-issue creation and the failure-issue cascade, leaving no visible artifact on a failed run. Add an "Ensure labels exist" step using `gh label create --force`, which upserts and is idempotent on every run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AI Code Review for PR #34pulseengine/pulseengine.eu: SummaryThis pull request addresses an issue where the auto-publish workflow was failing due to missing labels. The changes include adding a new step in the GitHub Actions workflow that ensures the required labels ( Potential Bugs or Issues
Security Concerns
Suggestions for Improvement
Overall AssessmentThe proposed changes address the immediate issue of missing labels and provide some basic error handling. However, there are potential improvements to be made to ensure robustness and security. The workflow should be thoroughly tested after merging to ensure it behaves as expected in various scenarios. This review was generated by a local AI model. It is advisory only and may contain inaccuracies. Reviewed at |
Summary
The first run of the new auto-publish workflow (run #24937929649) failed at the Post / update status comment step:
```
could not add label: 'autopublish-status' not found
```
gh issue create --label Xerrors out if X doesn't exist. The cascade meant the failure-issue step also failed (`autopublish-failure` label missing), so a failed run leaves no visible artifact.Fix
Add an idempotent "Ensure labels exist" step using `gh label create --force` (which upserts) before any step that uses the labels. Three labels:
Self-healing: if any label is deleted manually, the next cron run recreates it.
Test plan
🤖 Generated with Claude Code