Skip to content

Conversation

yangmillstheory
Copy link
Contributor

Fixes #4760.

Also some code hygiene: use early continue to minimize nesting and a large if block.

@yangmillstheory yangmillstheory requested a review from a team as a code owner September 12, 2025 08:09
@yangmillstheory yangmillstheory changed the title fix(webhook): Add org / repository context when unable to match labels Fix #4760: Add org / repository context when unable to match labels Sep 12, 2025
@yangmillstheory yangmillstheory changed the title Fix #4760: Add org / repository context when unable to match labels fix: Add org / repository context when unable to match labels Sep 12, 2025
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.
@yangmillstheory yangmillstheory changed the title fix: Add org / repository context when unable to match labels fix: Log org / repository context when unable to match labels Sep 14, 2025
@npalm npalm requested a review from Copilot September 15, 2025 16:03
Copy link
Contributor

@Copilot Copilot AI left a 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.

@yangmillstheory
Copy link
Contributor Author

@npalm Friendly ping? It's been a week and I think this PR is fairly simple / straightforward.

Copy link
Member

@npalm npalm left a 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.

@npalm npalm merged commit e214177 into github-aws-runners:main Sep 18, 2025
6 checks passed
npalm pushed a commit that referenced this pull request Sep 18, 2025
🤖 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>
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.

Add more context when workflow_job event isn't accepted due to label mismatch

2 participants