Skip to content

Conversation

aaronsteers
Copy link
Owner

feat: add cancellation handler for slash command comments

Summary

Adds a cancellation handler to post a final status update when poe command jobs are cancelled. Previously, only success and failure cases posted final status updates to PR comments, leaving cancelled jobs without any indication of their termination.

The new handler follows the same pattern as the existing failure handler but uses the cancelled() condition and posts an appropriate cancellation message with a ⚠️ emoji.

Changes:

  • Added "Append cancellation comment" step after the failure handler in action.yml
  • Uses cancelled() condition to trigger only when job is cancelled
  • Posts cancellation message to the same comment thread
  • Uses "eyes" reaction to indicate cancellation

Review & Testing Checklist for Human

This change has moderate risk as it cannot be easily tested without real-world usage. Please verify:

  • Test actual cancellation behavior: Trigger a workflow using this action (e.g., in a test branch) and cancel it mid-execution to verify the cancellation comment gets posted correctly
  • Review conditional logic: Verify that if: cancelled() is the correct GitHub Actions status function and won't conflict with if: failure() or other conditions
  • Consider message input design: The handler reuses inputs.failure-message for cancellation messages (as a fallback). Should there be a separate cancellation-message input parameter instead?
  • Verify reaction choice: Is "eyes" the appropriate reaction for cancellations, or would something else (e.g., "-1", "confused") be better?

Test Plan Recommendation

  1. Create a test workflow that uses this updated action version
  2. Trigger the workflow with a poe command that takes >30 seconds to complete
  3. Cancel the workflow run manually after it starts
  4. Verify that a cancellation comment appears on the PR/issue with the expected message and reaction

Notes

Copy link
Contributor

Original prompt from AJ Steers
@Devin - in the poe-command-processor, if a job is canceled, no final status update is sent to the slash command comment response.
Thread URL: https://airbytehq-team.slack.com/archives/D089P0UPVT4/p1760246415400909?thread_ts=1760246415.400909

Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

github-actions bot commented Oct 13, 2025

Running poe test-success-with-summary...

Link to job logs.

🟦 Poe command test-success-with-summary completed successfully.

✳️ Show/Hide Summary Output

Test Results

This is a test of the GITHUB_STEP_SUMMARY feature.

  • ✅ Item 1: Success
  • ✅ Item 2: Success
  • ✅ Item 3: Success

Status: All tests passed! 🎉

Copy link

github-actions bot commented Oct 13, 2025

Running poe test-success...

Link to job logs.

🟦 Poe command test-success completed successfully.

Copy link

github-actions bot commented Oct 13, 2025

Running poe test-fail-with-summary...

Link to job logs.

❌ Poe command test-fail-with-summary failed. Please inspect the logs.

✴️ Show/Hide Summary Output

Test Results

This is a test of the GITHUB_STEP_SUMMARY feature.

  • ✅ Item 1: Success
  • ✅ Item 2: Success
  • 😵 Item 3: Failure!!

ERROR: Something bad happened ☠️

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.

1 participant