Add Devin Playbook Sync GitHub Action#2
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
Conversation
- Create composite action with full Devin API integration - Support all 5 playbook operations (create, list, get, update, delete) - Add comprehensive README with usage examples - Add deployment documentation - Include test playbooks and test workflow - Integrate with Devin API endpoints for playbook management - Add dry-run mode for testing without API calls - Implement recursive directory scanning for .md files Features: - Automatic discovery of .md files in directories - Full API support for all Devin playbook operations - Secure API key handling via GitHub secrets - Detailed outputs (playbook IDs, counts, results) - Comprehensive error handling and validation Documentation includes: - Usage examples for all operations - Input/output reference - API documentation links - Troubleshooting guide - Deployment and release process Co-Authored-By: Sam Fertig <sam.fertig@codeium.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
- Redirect all log function output to stderr to prevent mixing with stdout data - Change arithmetic increments from ((var++)) to var=$((var + 1)) to avoid exit code 1 with set -e - Ensures script completes successfully when processing multiple files Fixes: - Test Dry Run Mode failure - script now processes all files and exits with code 0 - Test List Operation failure - log messages no longer interfere with JSON parsing - Both test playbooks are now successfully processed in dry-run mode Co-Authored-By: Sam Fertig <sam.fertig@codeium.com>
- Updated README to describe repository as containing multiple actions - Added section for Playbook Sync Action (at root) - Kept existing Devin API Action section (in devin-action/ subdirectory) - Both actions are now documented in the root README - Resolved merge conflict by combining documentation from both branches Co-Authored-By: Sam Fertig <sam.fertig@codeium.com>
5 tasks
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.
Add Devin Playbook Sync GitHub Action
Summary
This PR implements a GitHub Action that scans directories for Markdown files and syncs them as Devin playbooks using the Devin API. The action is implemented as a composite action with bash scripts and supports all 5 Devin playbook API operations (create, list, get, update, delete).
Key components added:
action.yml- Composite action definition with 9 inputs and 3 outputsscripts/sync-playbooks.sh- Main bash script (312 lines) handling all API operations.github/workflows/test-action.yml- CI workflow with 3 test jobs (all passing ✅)Implementation approach:
curlfor Devin API calls with Bearer token authenticationjqfor JSON payload construction and response parsingset -eand exit codesReview & Testing Checklist for Human
Test with real Devin API key - Run the action with actual API credentials to verify end-to-end functionality. The dry-run tests pass, but real API behavior may differ.
Test edge cases with markdown content - Verify the action handles:
Verify error handling - Test failure scenarios:
Review bash script security - Check
scripts/sync-playbooks.shfor:Repository structure discussion - This action is at the root level, but the repo already has
devin-action/in a subdirectory. Is this the desired organization? Consider if this action should also be in a subdirectory for consistency.Recommended Test Plan
list,get,update, anddeleteoperationssamfert-codeium/DEVIN-GITHUB-ACTIONS@v1Notes
CI fixes applied during development:
>&2) to prevent JSON parsing errors((var++))tovar=$((var + 1))to avoid exit code 1 withset -eLimitations:
bash,curl, andjq(all pre-installed on GitHub runners)ManageOrgPlaybookspermission in DevinSession info: