Skip to content

Add CI job to report main branch build failures via GitHub issues#4418

Draft
joostjager wants to merge 1 commit intolightningdevkit:mainfrom
joostjager:main-fail-issue
Draft

Add CI job to report main branch build failures via GitHub issues#4418
joostjager wants to merge 1 commit intolightningdevkit:mainfrom
joostjager:main-fail-issue

Conversation

@joostjager
Copy link
Contributor

@joostjager joostjager commented Feb 13, 2026

Adds a notify-failure job to the main CI workflow (build.yml) that automatically creates a GitHub issue when the main branch build fails. Uses jayqi/failed-build-issue-action to create or comment on an issue with the "build failed" label. The job triggers on main branch pushes when at least one job in build.yml has failed.

The new job depends on all existing jobs in build.yml and runs after they complete. If any job fails, it either creates a new issue with the "build failed" label or adds a comment to an existing open issue with that label. Closing the issue signals the problem is resolved; subsequent failures will create a fresh issue. The created issue is automatically assigned to the committer whose push triggered the failure.

Note that this only covers jobs in build.yml. Other workflows that run on main pushes (semver.yml, ldk-node-integration.yml) are not covered yet, as GitHub Actions needs cannot cross workflow boundaries. Expanding coverage would require some restructuring (e.g., converting them to reusable workflows or duplicating the notification job).

The action is pinned to a specific commit SHA rather than a mutable version tag to prevent supply chain attacks. Its permissions are scoped to issues: write only, so the token cannot be used to push code, modify workflows, or access secrets.

Tested on the main branch of my fork by deliberately breaking the rustfmt job. The action successfully created an issue: joostjager#3

@ldk-reviews-bot
Copy link

👋 Hi! I see this is a draft PR.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

Uses jayqi/failed-build-issue-action to automatically create or comment
on a "build failed" issue when any CI job fails on the main branch.
Assigns the created issue to the committer who triggered the failure.
Pins the action to a specific commit SHA for supply chain safety.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joostjager
Copy link
Contributor Author

joostjager commented Feb 13, 2026

For ldk-node-integration.yml it might be simpler to just duplicate the notification job there, since it's a standalone integration test that doesn't share any dependencies with the other CI jobs...

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.06%. Comparing base (0b45bfd) to head (4641656).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4418      +/-   ##
==========================================
- Coverage   86.07%   86.06%   -0.01%     
==========================================
  Files         156      156              
  Lines      103442   103442              
  Branches   103442   103442              
==========================================
- Hits        89033    89029       -4     
- Misses      11894    11900       +6     
+ Partials     2515     2513       -2     
Flag Coverage Δ
tests 86.06% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants