Skip to content

Conversation

@mathislucka
Copy link
Contributor

This PR extends the AI Issue Processor workflow to trigger not only when an issue is labeled with 'deepset-ai', but also when a comment is added to an issue that already has the 'deepset-ai' label.

Changes made:

  1. Added issue_comment event with created type to the workflow triggers to listen for new comments
  2. Modified the conditional check in the job to handle two scenarios:
    • When an issue is newly labeled with 'deepset-ai'
    • When a comment is added to an issue that already has the 'deepset-ai' label

Implementation details:

The implementation uses GitHub's conditional workflow syntax to check:

  • If the event type is 'issues' and the label name is 'deepset-ai' (original behavior)
  • OR if the event type is 'issue_comment' and the issue contains a label named 'deepset-ai'

For issue comments, we use contains(github.event.issue.labels.*.name, 'deepset-ai') to check if the 'deepset-ai' label is present in the list of labels attached to the issue being commented on.

Testing considerations:

This change can be tested by:

  1. Adding a comment to an issue labeled with 'deepset-ai' and verifying the workflow runs
  2. Confirming the original functionality still works when an issue is labeled with 'deepset-ai'

The rest of the workflow remains unchanged, so the same API call to the deepset AI Platform will be executed in both trigger scenarios.

Closes #15

@mathislucka mathislucka merged commit 0ee0930 into main Apr 23, 2025
3 checks passed
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.

feat: ai issue resolver should get triggered on comments to labeled issues

2 participants