-
Notifications
You must be signed in to change notification settings - Fork 681
fix: Log org / repository context when unable to match labels #4761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Log org / repository context when unable to match labels #4761
Conversation
Refactors the workflow job dispatch logic to handle non-'queued' actions first, returning early with a 201 status. Updates the sorting and dispatching logic for matcherConfig, and improves warning messages for unaccepted runner labels by including the repository name. This ensures jobs are only dispatched when appropriate and provides clearer logging.
28a34a6
to
afaf051
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves logging context when GitHub webhook events contain runner labels that don't match any configured runners. The fix adds organization and repository information to error messages to help with debugging.
- Adds repository context (
body.repository.full_name
) to error messages when labels are not accepted - Refactors conditional logic using early return pattern to reduce nesting
- Consolidates error message creation to avoid duplication
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@npalm Friendly ping? It's been a week and I think this PR is fairly simple / straightforward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yangmillstheory thx, looks good and checked.
🤖 I have created a release *beep* *boop* --- ## [6.7.8](v6.7.7...v6.7.8) (2025-09-18) ### Bug Fixes * **dispatcher:** Log org / repository context when unable to match labels ([#4761](#4761)) ([e214177](e214177)) @yangmillstheory * **lambda:** bump axios from 1.12.1 to 1.12.2 in /lambdas ([#4772](#4772)) ([4d0ad0a](4d0ad0a)) * **lambda:** bump axios from 1.8.4 to 1.12.0 in /lambdas ([#4763](#4763)) ([bbf1bd8](bbf1bd8)) * **lambda:** bump the aws group in /lambdas with 7 updates ([#4769](#4769)) ([7f30dca](7f30dca)) * **lambda:** bump the aws-powertools group in /lambdas with 4 updates ([#4770](#4770)) ([dbb6888](dbb6888)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
Fixes #4760.
Also some code hygiene: use early continue to minimize nesting and a large
if
block.