Skip to content

Conversation

@anishnaik
Copy link
Contributor

Summary

This PR adds a new GitHub Actions workflow that automatically updates the medusa and slither submodules weekly and creates a pull request for review.

Changes

  • New workflow: .github/workflows/update-submodules.yml
    • Runs every Monday at 9:00 AM UTC
    • Updates both program-analysis/medusa and program-analysis/slither to their latest master commits
    • Creates a single PR with all submodule updates
    • Only creates a PR when updates are available (smart change detection)

Motivation

The mdbook documentation integrates docs from the medusa and slither submodules. Currently, these submodules are only updated manually, which means the documentation may not reflect the latest changes. This automation ensures the docs stay current.

Workflow Behavior

  1. Weekly schedule: Runs every Monday at 9 AM UTC
  2. Update submodules: Fetches latest commits from tracked branches
  3. Detect changes: Skips PR creation if no updates available
  4. Create PR: Opens a PR with detailed description and review checklist
  5. Update existing PR: If a previous PR wasn't merged, it updates that PR instead of creating a new one

Testing Plan

Before merging:

  • Manual trigger test via Actions UI (workflow_dispatch)
  • Verify PR is created correctly with proper formatting
  • Test no-change scenario (run twice without merging)
  • Verify existing PR gets updated (not duplicated)

After merging:

  • Wait for first Monday scheduled run
  • Review automated PR for completeness
  • Verify deploy workflow succeeds on the automated PR

Notes

  • Requires dependencies and automated labels (will create them if needed)
  • Requires "Read and write permissions" enabled in repo settings under Actions → General
  • Uses peter-evans/create-pull-request@v7 for reliable automated PR creation

🤖 Generated with Claude Code

This workflow runs every Monday at 9 AM UTC to check for updates
to the medusa and slither submodules. When updates are found, it
creates a pull request with:

- Both submodule updates in a single PR
- Detailed description and review checklist
- Links to upstream repositories
- Smart detection to avoid empty PRs

The workflow ensures the mdbook always displays the latest
documentation from these submodules.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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.

3 participants