Skip to content

Add MD Playbook Scanner GitHub Action#5

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1762363604-md-playbook-scanner
Open

Add MD Playbook Scanner GitHub Action#5
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1762363604-md-playbook-scanner

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Add MD Playbook Scanner GitHub Action

Summary

This PR adds a new GitHub Action that automatically scans directories for Markdown files and creates Devin playbooks from them via the Devin API. This enables teams to version control their Devin playbooks as .md files alongside their code and automatically sync them to Devin.

Key Components:

  • 📁 New Action: md-playbook-scanner/ - Composite action using bash script
  • 🔧 Core Script: Recursively scans directories, reads .md files, calls Devin API to create playbooks
  • 📖 Documentation: Comprehensive README with usage examples and DEPLOYMENT guide
  • Testing: CI workflow that validates the action with test markdown files
  • 📝 Updated Main README: Added section for the new action

What it does:

  1. Scans specified directory recursively for all .md files
  2. For each file: uses filename (without extension) as playbook title, file content as playbook body
  3. Creates playbook via POST to https://api.devin.ai/v1/playbooks
  4. Returns statistics (created count, failed count) and JSON array of playbook IDs

Local Testing Results:
✅ Successfully tested locally - created 3 test playbooks with IDs returned correctly

Review & Testing Checklist for Human

  • Verify DEVIN_API_KEY secret is configured in repository settings (Settings → Secrets and variables → Actions). Without this, the test workflow will fail.
  • Trigger the test workflow manually (Actions → Test MD Playbook Scanner → Run workflow) to validate end-to-end functionality in CI
  • Check API field names: I used title and body based on Devin API docs, but existing devin-action uses name and content. Verify the API accepts title/body by reviewing test workflow results.
  • Review error handling behavior: Action exits with failure if ANY playbook fails to create. Consider if partial success scenarios should be handled differently.
  • Test with real markdown directory if you have one - the action is ready to use with ./md-playbook-scanner in workflows

Test Plan

  1. Add DEVIN_API_KEY secret to repository (if not already present)
  2. Go to Actions → "Test MD Playbook Scanner" → Run workflow
  3. Verify the workflow:
    • Creates 3 test playbooks successfully
    • Returns correct output values (playbooks-created=3, playbooks-failed=0)
    • Returns valid playbook IDs array
    • Handles error case (non-existent directory) correctly
  4. If tests pass, the action is ready for use

Notes

Research Completed:

  • ✅ Reviewed GitHub Actions documentation on creating actions
  • ✅ Studied Devin API documentation for playbook endpoints
  • ✅ Examined reference repositories (setup-uv, ruff-action) for patterns
  • ✅ Followed existing devin-action composite action pattern for consistency

Known Limitations:

  • Only processes files with lowercase .md extension (case-sensitive)
  • No dry-run mode implemented (mentioned in example but not in action)
  • May hit API rate limits with very large directories (untested)
  • Exits with failure on any failed playbook (no partial success mode)

Link to Devin Run: https://app.devin.ai/sessions/3bf44fc651184d1a86d621ea7e60ae61
Requested by: Sam Fertig (@samfert-codeium)

- Create new composite action that scans directories for .md files
- Automatically creates Devin playbooks via API for each file
- Implements recursive directory scanning
- Returns statistics (created, failed) and playbook IDs
- Includes comprehensive documentation (README, DEPLOYMENT)
- Adds test workflow for CI validation
- Updates main README with new action documentation

Related to: https://app.devin.ai/sessions/3bf44fc651184d1a86d621ea7e60ae61
Requested by: Sam Fertig (@samfert-codeium)

Co-Authored-By: Sam Fertig <sam.fertig@codeium.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 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

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.

0 participants