Skip to content

Conversation

@ultmaster
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 27, 2025 11:39
Copy link
Contributor

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 adds automatic PR commenting functionality for workflow runs triggered via repository_dispatch events. When a workflow is dispatched, a comment will be posted to the associated pull request with a link to track the workflow run's progress.

Key Changes:

  • Introduced a new dispatch_comment.js script that posts comments to PRs when workflows are triggered via repository dispatch
  • Added dispatch-notify jobs to multiple workflow files to execute the commenting functionality
  • Removed the unused trigger_on_label.js script

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/dispatch_comment.js New script that posts workflow run links as PR comments
scripts/trigger_on_label.js Removed unused label-based trigger logic
.github/workflows/tests-full.yml Added dispatch-notify job and issues write permission
.github/workflows/examples-unsloth.yml Added dispatch-notify job and issues write permission
.github/workflows/examples-spider.yml Added dispatch-notify job and issues write permission
.github/workflows/examples-compat.yml Added dispatch-notify job and issues write permission
.github/workflows/examples-calc-x.yml Added dispatch-notify job and issues write permission
.github/workflows/examples-apo.yml Added dispatch-notify job and issues write permission

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +23 to +28
await github.rest.issues.createComment({
owner,
repo,
issue_number: pullNumber,
body,
});
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The createComment API call should include error handling. If the PR number is invalid or the API call fails, the workflow will crash without providing useful feedback. Consider wrapping this in a try-catch block and using core.setFailed() or core.warning() to handle failures gracefully.

Copilot uses AI. Check for mistakes.
@ultmaster ultmaster merged commit 3966db6 into main Oct 27, 2025
12 checks passed
ultmaster added a commit that referenced this pull request Oct 27, 2025
Copilot AI mentioned this pull request Oct 27, 2025
ultmaster added a commit that referenced this pull request Oct 27, 2025
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