refactor: consolidate Devin session logic into reusable action#26843
Merged
keithwillcode merged 5 commits intomainfrom Jan 14, 2026
Merged
refactor: consolidate Devin session logic into reusable action#26843keithwillcode merged 5 commits intomainfrom
keithwillcode merged 5 commits intomainfrom
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Create .github/actions/devin-session composite action for session checking - Update stale-pr-devin-completion.yml to use the new action - Update cubic-devin-review.yml to use the new action - Update devin-conflict-resolver.yml to use the new action - Rename workflows to 'PR Labeled' with descriptive job names The new action checks for existing Devin sessions by: 1. Looking for session URLs in PR body (for PRs created by Devin) 2. Searching PR comments for known Devin session patterns 3. Verifying session is active (working, blocked, or resumed status) This eliminates duplicated session checking logic across all three workflows. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Reverted workflow names back to descriptive names: - 'Stale Community PR Devin Completion' (was 'PR Labeled') - 'Devin PR Conflict Resolver' (was 'PR Labeled') Descriptive names are the recommended convention as they appear in GitHub Actions tab, status checks, and notifications. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name=".github/actions/devin-session/action.yml">
<violation number="1" location=".github/actions/devin-session/action.yml:70">
P1: Missing active status check for PR body sessions. When a session is found from the PR body, the code doesn't verify if it's active (`working`, `blocked`, or `resumed`), unlike the comment-based session check below. This could cause workflows to try reusing completed or failed sessions.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Contributor
Devin AI is addressing Cubic AI's review feedbackNew feedback has been sent to the existing Devin session. |
Addresses Cubic AI feedback (confidence 9/10): PR body sessions now verify the session is active (working, blocked, or resumed) before reusing, matching the behavior of comment-based session checks. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
E2E results are ready! |
volnei
reviewed
Jan 14, 2026
volnei
reviewed
Jan 14, 2026
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
volnei
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR consolidates duplicated Devin session management logic from three workflows into a single reusable GitHub action. Originally, the
Stale Community PR Devin Completionworkflow was creating duplicate sessions (as seen in PR #22542), and the fix revealed significant code duplication across workflows.Changes
New reusable action (
.github/actions/devin-session/action.yml):working,blocked, orresumedstatus) for both PR body and comment-based sessionsUpdated workflows to use the new action:
stale-pr-devin-completion.yml- now reuses existing sessionscubic-devin-review.yml- refactored to use actiondevin-conflict-resolver.yml- refactored to use actionUpdates since last revision
working,blocked, orresumedstatus.Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Test session reuse on stale PR workflow:
stalelabelTest session reuse on conflict resolver:
devin-conflict-resolutionlabelTest Cubic AI review workflow:
Human Review Checklist
has-existing-session,session-id,session-url) are correctly consumedVerify active status check is applied to PR body sessions(Fixed per Cubic AI feedback)